I have a curious case regarding the capitalizedString method for NSString .
I called capitalizedString on the following line: "bloor-yonge"
and he returned: "Bloor-Yonge"
I specifically recalled from the dev documentation the following information regarding capitalizedString :
"Other common word delimiters, such as hyphens and other punctuation, are not considered, so this method usually cannot produce the desired results for verbose lines."
I am curious to know why yonge--> becomes Yonge and why this happened, despite the indicated exception in the documentation. Can anyone explain this?
Thanks for your time and reply in advance!
PS In fact, it did what I wanted it to be done - I'm just curious in the future when I do not want capital letters to be capitalized.
source share