Instance Method

enumerateTokensInRange:usingBlock:

Enumerates over a given range of the string and calls the specified block for each token.

Declaration

- (void)enumerateTokensInRange:(NSRange)range usingBlock:(void (^)(NSRange tokenRange, NLTokenizerAttributes flags, BOOL *stop))block;

Parameters

range

The range of the string to tokenize.

block

The closure to call after each token; return false if processing should stop.

See Also

Enumerating the Tokens

- tokensForRange:

Tokenizes the string within the provided range.

- tokenRangeAtIndex:

Finds the range of the token at the given index.