VoiceMan
|
Enumerates sequences in string separated by characters from specified set. More...
Public Types | |
typedef T::value_type | CHAR |
Public Member Functions | |
T::size_type | end () const |
Returns index of the ending character of current sequence. | |
bool | match (CHAR c) const |
Checks if specified character is in set of characters to find sequences with. | |
bool | next () |
Go to next sequence of enumeration. | |
T::size_type | start () const |
Returns index of the starting character of current sequence. | |
T | str () const |
Returns current sequence. | |
StringDelimitedIterator (const T &str, const T &chars) | |
The constructor. |
This class takes two string at the construction: first string specifies string to look through, second string specifies set of characters to separate parts to enumerate. During the enumeration this class returnes all substrings of maximum length separated by specified characters.
StringDelimitedIterator< T >::StringDelimitedIterator | ( | const T & | str, |
const T & | chars | ||
) | [inline] |
[in] | str | The string to look through |
[in] | chars | The set of characters to separate substrings |
T::size_type StringDelimitedIterator< T >::end | ( | ) | const [inline] |
Use this method to get index of ending character of the current sequence.
bool StringDelimitedIterator< T >::match | ( | CHAR | c | ) | const [inline] |
Use this method to check, if specified character can be included in sequences to return.
[in] | c | The character to check |
bool StringDelimitedIterator< T >::next | ( | ) | [inline] |
This method allows enumeration over all sequences of specified string. Just call it until it is returned false.
T::size_type StringDelimitedIterator< T >::start | ( | ) | const [inline] |
Use this method to get index of starting character of the current sequence.
T StringDelimitedIterator< T >::str | ( | ) | const [inline] |
Use this method to get value of the sequence iterator is points to.