CPTokenRecogniser Protocol Reference
Conforms to | NSCoding NSObject |
Declared in | CPTokenRecogniser.h |
Tasks
-
– recogniseTokenInString:currentTokenPosition:
Attempts to recognise a token at tokenPosition in tokenString.
required method
Instance Methods
recogniseTokenInString:currentTokenPosition:
Attempts to recognise a token at tokenPosition in tokenString.
- (CPToken *)recogniseTokenInString:(NSString *)tokenString currentTokenPosition:(NSUInteger *)tokenPosition
Parameters
- tokenString
The string in which to recognise tokens.
- tokenPosition
The position at which to try to find the token. On output, the position after the recognised token.
Return Value
Returns the token recognised.
Discussion
Attempts to recognise a token at tokenPosition in tokenString.
If a token is successfully recognised, it should be returned, and tokenPosition advanced to after the consumed characters.
If no valid token is found nil
must be returned instead, and tokenPosition left unchanged.
Declared In
CPTokenRecogniser.h