Sunday, May 15, 2011

NSString lowercaseString example objc

NSString:lowercaseString returns a string that is lower case version of the source string. See following example of NSString:lowercaseString. Note that the method returns a new NSString object. The original NSString object is not affected at all.

NSString      *str = @"TEST STRING";
NSString      *lower;

lower = [str  lowercaseString];
NSLog(@"%@", lower);   // Should output "test string"