class StringTokenizer

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::util::StringTokenizer Class Reference

#include <StringTokenizer.h>

Inheritance diagram for acdk::util::StringTokenizer:

acdk::lang::Object acdk::util::Iterator acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

API: Java extended<br/>.

Roger Rene Kommer (mailto:kommer@artefaktur.com)
2005/04/09 19:26:57

Public Member Functions

 StringTokenizer (IN(RString) text, IN(RString) delimiter, bool delimiteraretoken=false, bool useDelimerAsChars=false)
 StringTokenizer (IN(RString) text)
 The character '
' are token bounds is equal to call StringTokenizer(text, , false, true).

bool hasMoreTokens ()
int countTokens ()
RString nextToken () throw ( RNoSuchElementException )
RString nextToken (IN(RString) delim, bool useDelimerAsChars=false) throw ( RNoSuchElementException )
RStringArray allToken ()
 returns all parsed token

virtual bool hasNext ()
virtual acdk::lang::Object next ()
virtual acdk::lang::Object element ()
virtual void remove ()
 remove current element from the iterator.

Protected Member Functions

bool _findNextToken (int offset)

Private Attributes

int _pos
RString _buffer
RString _delimiter
RString _lastElement
bool _delimiterAreToken
bool _useDelimerAsChars
int _nextBegin
 next token start

int _nextEnd
 next token end

Constructor & Destructor Documentation

acdk::util::StringTokenizer::StringTokenizer IN(RString text,
IN(RString delimiter,
bool  delimiteraretoken = false,
bool  useDelimerAsChars = false

text to parse
delimiter used as delimiter
delimiteraretoken return found delimiter as token
useDelimerAsChars will not search for delimiteraretoken as string, but each character in delimiteraretoken is a delimiter

acdk::util::StringTokenizer::StringTokenizer IN(RString text  )  [inline]

The character '
' are token bounds is equal to call StringTokenizer(text, , false, true).

Member Function Documentation

bool acdk::util::StringTokenizer::_findNextToken int  offset  )  [protected]

RStringArray acdk::util::StringTokenizer::allToken  ) 

returns all parsed token

int acdk::util::StringTokenizer::countTokens  ) 

virtual acdk::lang::Object acdk::util::StringTokenizer::element  )  [virtual]

Implements acdk::util::Iterator.

bool acdk::util::StringTokenizer::hasMoreTokens  ) 

virtual bool acdk::util::StringTokenizer::hasNext  )  [inline, virtual]

Implements acdk::util::Iterator.

virtual acdk::lang::Object acdk::util::StringTokenizer::next  )  [inline, virtual]

Implements acdk::util::Iterator.

RString acdk::util::StringTokenizer::nextToken IN(RString delim,
bool  useDelimerAsChars = false
throw ( RNoSuchElementException )

RString acdk::util::StringTokenizer::nextToken  )  throw ( RNoSuchElementException )

virtual void acdk::util::StringTokenizer::remove  )  [virtual]

remove current element from the iterator.

May not support by all Iterator

Implements acdk::util::Iterator.

Member Data Documentation

RString acdk::util::StringTokenizer::_buffer [private]

RString acdk::util::StringTokenizer::_delimiter [private]

bool acdk::util::StringTokenizer::_delimiterAreToken [private]

RString acdk::util::StringTokenizer::_lastElement [private]

int acdk::util::StringTokenizer::_nextBegin [mutable, private]

next token start

int acdk::util::StringTokenizer::_nextEnd [mutable, private]

next token end

int acdk::util::StringTokenizer::_pos [mutable, private]

bool acdk::util::StringTokenizer::_useDelimerAsChars [private]