Sunday, May 15, 2011

NSString uppercaseString example objc

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

Example - (NSString uppercaseString)
{
NSString      *str = @"test string";
NSString      *upper;

upper = [str  uppercaseString];
NSLog(@"%@", upper);   // Should output "TEST STRING"
}