Instance Method

scanCharactersFromSet:intoString:

Scans the string as long as characters from a given character set are encountered, accumulating characters into a string that’s returned by reference.

Declaration

- (BOOL)scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable *)result;

Parameters

scanSet

The set of characters to scan.

stringValue

Upon return, contains the characters scanned.

Return Value

YES if the receiver scanned any characters, otherwise NO.

Discussion

Invoke this method with NULL as stringValue to simply scan past a given set of characters.

See Also

Scanning Characters and Strings

- scanUpToCharactersFromSet:intoString:

Scans the string until a character from a given character set is encountered, accumulating characters into a string that’s returned by reference.

- scanString:intoString:

Scans a given string, returning an equivalent string object by reference if a match is found.

- scanUpToString:intoString:

Scans the string until a given string is encountered, accumulating characters into a string that’s returned by reference.