O(n) Convert a string to title case, using simple case
conversion.
The first letter (as determined by isLetter)
of the input is converted to title case, as is
every subsequent letter that immediately follows a non-letter.
Every letter that immediately follows another letter is converted
to lower case.
The result string may be longer than the input string. For example,
the Latin small ligature fl (U+FB02) is converted to the
sequence Latin capital letter F (U+0046) followed by Latin small
letter l (U+006C).
This function is not idempotent.
Consider lower-case letter ʼn (U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE).
Then toTitle "ʼn" = "ʼN": the first (and the only) letter of the input
is converted to title case, becoming two letters.
Now ʼ (U+02BC MODIFIER LETTER APOSTROPHE) is a modifier letter
and as such is recognised as a letter by isLetter,
so toTitle "ʼN" = "'n".
Note: this function does not take language or culture specific
rules into account. For instance, in English, different style
guides disagree on whether the book name "The Hill of the Red
Fox" is correctly title cased—but this function will
capitalize every word.