Deviopath › Go

Title Case Words

Easy · Strings

strings.ToUpper / ToLower work on whole strings. For each word, uppercase the first rune and lowercase the rest. Keep a single space between words (strings.Fields already drops extra spaces).

Write TitleWords(s) that title-cases each word.

Next: Rectangle Area