首页 > 代码库 > NSCharacterSet

NSCharacterSet

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]];