Je libo psát titul před nebo za jméno. Snad každý kdo se někdy vrhnul na programování nějakého toho adresáře či personální databáze se již potýkal s problémem, jak a kam psat ten či onen titul. Abych usnadnil prací všem ostatním tak jsem si pro Vás připravil malý přehled včetně zdrojového kódu ve VB.NET
Všechny používané tituly
„Ing. CSc. Dr. PaedDr. RNDr. MUDr. MVDr. Mgr. Bc. MgA. Prof. DiS. Doc. PhDr.“
Tituly za jménem
„Ph.D. Th.D. CSc. DrCs. dr. h. c. “
Tituly pred jmenem
„Bc. BcA. Ing. Ing.arch. MUDr. MVDr. MgA. Mgr. JUDr. PhDr. RNDr. PharmDr. ThLic. ThDr. prof. doc. PaedDr. Dr. PhMr.“
\' Zadejte libovolný řetezec se všemi tituly človíčka oddělených mezerou a tituly budou rozděleny dle normy na tituly pred jmenem a za jmenem Sub RozdelTituly(ByVal CelyTitul As String, ByRef TitulPred As String, ByRef TitulZa As String) \' Tituly pred jmenem CelyTitul = CelyTitul.Trim() CelyTitul = CelyTitul.ToLower() TitulPred = "" If CelyTitul.IndexOf("prof.") >= 0 Then TitulPred = TitulPred & " prof." End If If CelyTitul.IndexOf("doc.") >= 0 Then TitulPred = TitulPred & " doc." End If If CelyTitul.IndexOf("ing.arch.") >= 0 Or CelyTitul.IndexOf("ing. arch.") >= 0 Then TitulPred = TitulPred & " Ing.arch." End If If CelyTitul.IndexOf("ing.") >= 0 Then TitulPred = TitulPred & " Ing." End If If CelyTitul.IndexOf("mudr.") >= 0 Then TitulPred = TitulPred & " MUDr." End If If CelyTitul.IndexOf("mvdr.") >= 0 Then TitulPred = TitulPred & " MVDr." End If If CelyTitul.IndexOf("mga.") >= 0 Then TitulPred = TitulPred & " MgA." End If If CelyTitul.IndexOf("mgr.") >= 0 Then TitulPred = TitulPred & " Mgr." End If If CelyTitul.IndexOf("judr.") >= 0 Then TitulPred = TitulPred & " JUDr." End If If CelyTitul.IndexOf("phdr.") >= 0 Then TitulPred = TitulPred & " PhDr." End If If CelyTitul.IndexOf("rndr.") >= 0 Then TitulPred = TitulPred & " RNDr." End If If CelyTitul.IndexOf("pharmdr.") >= 0 Then TitulPred = TitulPred & " PharmDr." End If If CelyTitul.IndexOf("thdr.") >= 0 Then TitulPred = TitulPred & " ThDr." End If If CelyTitul.IndexOf("thlic.") >= 0 Then TitulPred = TitulPred & " ThLic." End If If CelyTitul.IndexOf("paeddr.") >= 0 Then TitulPred = TitulPred & " PaedDr." End If If CelyTitul.IndexOf("dr.") >= 0 And CelyTitul.IndexOf("mudr.") < 0 And CelyTitul.IndexOf("mvdr.") < 0 And CelyTitul.IndexOf("judr.") < 0 And CelyTitul.IndexOf("phdr.") < 0 And CelyTitul.IndexOf("rndr.") < 0 And CelyTitul.IndexOf("pharmdr.") < 0 And CelyTitul.IndexOf("thdr.") < 0 And CelyTitul.IndexOf("paeddr.") < 0 And CelyTitul.IndexOf("dr.h.c.") < 0 And CelyTitul.IndexOf("dr. h. c.") < 0 Then TitulPred = TitulPred & " Dr." End If If CelyTitul.IndexOf("phmr.") >= 0 Then TitulPred = TitulPred & " PhMr." End If If CelyTitul.IndexOf("bc.") >= 0 Then TitulPred = TitulPred & " Bc." End If If CelyTitul.IndexOf("bca.") >= 0 Then TitulPred = TitulPred & " BcA." End If TitulPred = TitulPred.Trim() TitulZa = "" \' Tituly za jmenem If CelyTitul.IndexOf("ph.d.") >= 0 Or CelyTitul.IndexOf("phd.") >= 0 Then TitulZa = TitulZa & " Ph.D." End If If CelyTitul.IndexOf("th.d.") >= 0 Or CelyTitul.IndexOf("thd.") >= 0 Then TitulZa = TitulZa & " Th.D." End If If CelyTitul.IndexOf("csc.") >= 0 Then TitulZa = TitulZa & " CSc." End If If CelyTitul.IndexOf("dis.") >= 0 Then TitulZa = TitulZa & " DiS." End If If CelyTitul.IndexOf("drsc.") >= 0 Then TitulZa = TitulZa & " DrSc." End If If CelyTitul.IndexOf("dr.h.c.") >= 0 Or CelyTitul.IndexOf("dr. h. c.") >= 0 Then TitulZa = TitulZa & " Dr.h.c." End If TitulZa = TitulZa.Trim() End Sub