I have many short strings of words that have been joined (no spaces) and where the first character of each word is capitalized (title case), for example, OnTopOfTheWorld. I want to insert spaces in between the words, and the only way I could come up with doing that is by partitioning the strings into characters, identifying the positions of the caps, and inserting a space before each cap. My code looks like this: