Monday, July 16, 2012

How to capitalize first letter of NSString ?


NSString *myString = @"i want first letter capitalized.";
NSString *newString = [myString stringByReplacingCharactersInRange:NSMakeRange(0,1withString:[[myStringsubstringToIndex:1capitalizedString]];
sdsad

This will give output of newString as  I want first letter capitalized

No comments:

Post a Comment