- Adopted by:
- DData, DText
- Declared in:
- DTextScannable.h
Protocol Description
The DTextScannable protocol extends a Readable protocol. It specifies the
interface for higher level methods for scanning of text by a class
implementing this interface. Due to the 'forward' looking nature of some of
the methods, not all classes implementing the Readable interfaces are able
to implement the DTextScannable interface.
- Last modified:
- 31-Oct-2007 (DTextScannable.h)
Method Index
- - (BOOL) cmatch :(const char *) cstr
- Match a string case sensitive; if the string matched, the current position in
the readable is moved to the location after the matched string.
- Parameters:
- cstring - the c-string to be matched
- Returns:
- does the string match ?
- - (BOOL) imatch :(const char *) cstr
- Match a string case insensitive; if the string matched, the current position in
the readable is moved to the location after the matched string.
- Parameters:
- cstring - the c-string to be matched
- Returns:
- does the string match ?
- - (int) scanInt :(int) wrong
- Scan for an integer value
- Parameters:
- wrong - the value returned if there is no int to scan
- Returns:
- the integer read (or the wrong value)
- - (DText *) scanText :(char) separator
- Scan for a text string until a separator character. The separator character is
is not part of the returned string and is skipped in the Readable.
- Returns:
- a (new) text string (or nil if the separator is not found)
- - (DText *) scanText :(const char *) separators :(char *) separator
- Scan for a text string until one of the separator characters in the
separator string. The matched separator character is is not part of
the returned string, is skipped in the text object and is returned in
the separator argument.
- Parameters:
- separators - the c-string with the separators
separator - the destination for the actual matched separator character (or NULL)
- Returns:
- a (new) text string (or nil if none of the separators is found)
- - (int) skipChar :(char) ch
- Skip characters
- Parameters:
- ch - the character to be skipped
- Returns:
- the number of characters skipped
- - (int) skipWhiteSpace
- Skip whitespace
- Returns:
- the number of characters skipped
generated 05-Nov-2007 by ObjcDoc 3.0.0