objective-C 中类似于C#中trim的方法(去掉字符串前后空格)
时间:2011-01-10 来源:鬼手如冰
NSString *string = @" spaces in front and at the end ";
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSLog(trimmedString)
相关阅读 更多 +