Convert to lower case or upper case
suggest changeConvert a string to lower case or upper case with strings.ToLower and strings.ToUpper. strings.ToTitle uses Unicode title case. For these letters that is the same as upper case; it does not capitalize words the way English title case does.
s := "Mixed Case"
fmt.Printf("ToLower(s): '%s'\n", strings.ToLower(s))
fmt.Printf("ToUpper(s): '%s'\n", strings.ToUpper(s))
fmt.Printf("ToTitle(s): '%s'\n", strings.ToTitle(s))
ToLower(s): 'mixed case'
ToUpper(s): 'MIXED CASE'
ToTitle(s): 'MIXED CASE'
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents