IOS How to trim all leading whitespace from NSString
NSString *myText = @" hello foo ";
NSString *trimmedText = [myText stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];
NSLog(@"old = [%@], trimmed = [%@]", myText, trimmedText);
Comments
Post a Comment