标签:
NSString *string = @
" spaces in front and at the end "
;
NSString *trimmedString = [string stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString 去掉前后空格或回车符
原文地址:http://www.cnblogs.com/hanjian/p/4958180.html