============================================================
博文原创,转载请声明出处
============================================================
An NSString object represents a string of ordered characters (text). An NSCharacterSet object represents a set of characters in no particular order. It is often much quicker to determine whether a character is a member of an NSCharacterSet than an NSString. You can't use an NSCharacterSet object to hold text, at least not in any sensible way, because it does not maintain any order of characters, its use is primarily for determining whether a character exists in a set of characters.
我们在nsstring的分割,查找等操作中,经常会提供两种函数,参数类型分别为NSString 和NSCharacterset,有什么不同呢?
NSString 是有序字符串
NSCharacterset是无需字符集合,主要用来判断已知字符串是否包含制定字符集,而不可以用来保存字符串。