StringIterator< T > Class Template Reference

Enumerates sequences in string of characters from specified set. More...

List of all members.

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.
str () const
 Returns current sequence.
 StringIterator (const T &str, const T &chars)
 The constructor.


Detailed Description

template<class T>
class StringIterator< T >

This class takes two string at the construction: first string specifies string to look through, second string specifies set of characters to search in first one. During the enumeration this class returnes all substrings of maximum length with specified characters.

See also:
StringDelimitedIterator

Constructor & Destructor Documentation

template<class T >
StringIterator< T >::StringIterator ( const T &  str,
const T &  chars 
) [inline]

Parameters:
[in] str The string to look through
[in] chars The set of characters to extract substrings with


Member Function Documentation

template<class T >
T::size_type StringIterator< T >::end (  )  const [inline]

Use this method to get index of ending character of the current sequence.

Returns:
Index of ending character of sequence in string

template<class T >
bool StringIterator< T >::match ( CHAR  c  )  const [inline]

Use this method to check, if specified character can be included in sequences to return.

Parameters:
[in] c The character to check
Returns:
Non-zero if character can be included in sequences to return

template<class T >
bool StringIterator< T >::next (  )  [inline]

This method allows enumeration over all sequences of specified string. Just call it until it is returned false.

Returns:
Non-zero if there is left sequences or zero otherwise

template<class T >
T::size_type StringIterator< T >::start (  )  const [inline]

Use this method to get index of starting character of the current sequence.

Returns:
Index of starting character of sequence in string

template<class T >
T StringIterator< T >::str (  )  const [inline]

Use this method to get value of the sequence iterator is points to.

Returns:
The current sequence


Generated on Tue May 17 03:35:29 2011 for VoiceMan by  doxygen 1.5.9