Is there any difference between the ToUpper and the ToTitle function?
According to unicode.org
"Because of the inclusion of certain composite characters for compatibility, such as U+01F1 latin capital letter dz, a third case, called titlecase, is used where the first character of a word must be capitalized. An example of such a character is U+01F2 latin capital letter d with small letter z. The three case forms are UPPERCASE, Titlecase, and lowercase."
This means that when you use ToTitle
or ToUpper
for characters like dz
, you'll probably not be able to visually distinguish the result, but the two methods will return different unicode code points.
dz = "\u01f3"
ToUpper(dz) = "\u01f1"
ToTittle(dz) = "\u01f2"
https://play.golang.org/p/OAjONd87y2