Objective-C Language Changing Case


Example

To convert a String to uppercase, use uppercaseString:

NSString *myString = @"Emphasize this";
NSLog(@"%@", [myString uppercaseString]; // @"EMPHASIZE THIS"

To convert a String to lowercase, use lowercaseString:

NSString *myString = @"NORMALIZE this";
NSLog(@"%@", [myString lowercaseString]; // @"normalize this"

To capitalize the first letter character of each word in a string, use capitalizedString:

NSString *myString = @"firstname lastname";
NSLog(@"%@", [myString capitalizedString]); // @"Firstname Lastname"