String Processing

The Foundation framework contains powerful string processing capabilities. Some are implemented directly by NSString methods such as –rangeOfString: and –componentsSeparatedByString:. The Foundation framework provides the NSCharacterSet and NSScanner classes that are used together to enable additional types of string processing. A character set defines a set of Unicode characters, and a scanner is used to find patterns involving characters from a set.

NSCharacterSet

The NSCharacterSet class encapsulates a set of Unicode characters. NSCharacterSet is the public interface to a class cluster containing private classes optimized for different situations. For example, a character set composed solely of the ASCII subset of Unicode ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.