NSCharacterSet
inherits from: NSObject
Conforms to: NSObject, NSCoding, NSMutableCopying, NSCopying
Class Methods:
whitespaceCharacterSet
Returns a character set containing only the in-line whitespace characters space (U+0020) and tab (U+0009)
+ (id)whitespaceCharacterSet
e.g.
NSString * str;
NSString *trimmedStr;
trimmedStr = [str stringByTrimmingCharactersInset:[NSCharacterSet whitespaceCharacterSet]];
原文地址:http://zhangjiansong0.blog.51cto.com/6283606/1437367