Does anyone know exactly what the new (iOS 6) lowercaseStringWithLocale method of NSString does? The documentation is very skimpy, and I didn’t find a single reference to this method in Apple’s developer forums.
While localizing my app, I’m interested in changing words from my strings file to lowercase when they appear in a sentence — except in the German version, where some words should stay in uppercase at all times. Is that what this method is for? Or something completely different?
The discussion in
lowercaseStringmight shed some light:So if you’re computing the lowercase version of a string for a purpose such as case-insensitive database lookup, use
lowercaseString. If you intend to show the user the result, then uselowercaseStringWithLocale.Note that
lowercaseStringWithLocalewon’t make a decision based on the actual words as to whether the word should be lowercased or not. It does what you ask it to do, and doesn’t question your motives.