## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# StringTokenizer Class Reference

List of all members.

## Public Types

- typedef size_t size_type

## Public Member Functions

- StringTokenizer (const XalanDOMString &theString, const XalanDOMString &theTokens, bool fReturnTokens=false)
    Constructs a tokenizer for the target string.
- StringTokenizer (const XalanDOMString &theString, const XalanDOMChar *theTokens=s_defaultTokens, bool fReturnTokens=false)
    Constructs a tokenizer for the target string.
- StringTokenizer (const XalanDOMChar *theString, const XalanDOMChar *theTokens=s_defaultTokens, bool fReturnTokens=false)
    Constructs a tokenizer for the target string.
- StringTokenizer (const XalanDOMChar *theString, const XalanDOMString &theTokens, bool fReturnTokens=false)
    Constructs a tokenizer for the target string.
- ~StringTokenizer ()
- bool hasMoreTokens () const
    Determine if there are tokens remaining.
- void nextToken (XalanDOMString &theToken)
    Retrieve the next token to be parsed; behavior is undefined if there are no more tokens.
- size_type countTokens () const
    Count the number of tokens yet to be parsed.
- void reset ()

## Static Public Attributes

- const XalanDOMChar s_defaultTokens []

## Protected Member Functions

- XalanDOMString::size_type FindNextDelimiterIndex (XalanDOMString::size_type theStartIndex) const

## Member Typedef Documentation

typedef size_t StringTokenizer::size_type

## Constructor & Destructor Documentation

StringTokenizer::StringTokenizer | ( | const XalanDOMString & | theString,
|  | const XalanDOMString & | theTokens,
|  | bool | fReturnTokens = false
| ) |

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters:

  theString | string to tokenize
  theTokens | string of delimiters used to parse target, default is " \t\n\r"
  fReturnTokens | if true, delimiter characters are also returned as tokens, default is false

StringTokenizer::StringTokenizer | ( | const XalanDOMString & | theString,
|  | const XalanDOMChar * | theTokens = s_defaultTokens,
|  | bool | fReturnTokens = false
| ) |

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters:

  theString | string to tokenize
  theTokens | string of delimiters used to parse target, default is " \t\n\r"
  fReturnTokens | if true, delimiter characters are also returned as tokens, default is false

StringTokenizer::StringTokenizer | ( | const XalanDOMChar * | theString,
|  | const XalanDOMChar * | theTokens = s_defaultTokens,
|  | bool | fReturnTokens = false
| ) |

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters:

  theString | string to tokenize
  theTokens | string of delimiters used to parse target.
  fReturnTokens | if true, delimiter characters are also returned as tokens, default is false

StringTokenizer::StringTokenizer | ( | const XalanDOMChar * | theString,
|  | const XalanDOMString & | theTokens,
|  | bool | fReturnTokens = false
| ) |

Constructs a tokenizer for the target string.

No copies of any input strings are made.

Parameters:

  theString | string to tokenize
  theTokens | string of delimiters used to parse target.
  fReturnTokens | if true, delimiter characters are also returned as tokens, default is false

StringTokenizer::~StringTokenizer | ( |  | ) |

## Member Function Documentation

size_type StringTokenizer::countTokens | ( |  | ) | const

Count the number of tokens yet to be parsed.

Returns:
  number of remaining tokens

XalanDOMString::size_type StringTokenizer::FindNextDelimiterIndex | ( | XalanDOMString::size_type | theStartIndex | ) | const`[protected]`

bool StringTokenizer::hasMoreTokens | ( |  | ) | const

Determine if there are tokens remaining.

Returns:
  true if there are more tokens

void StringTokenizer::nextToken | ( | XalanDOMString & | theToken | ) |

Retrieve the next token to be parsed; behavior is undefined if there are no more tokens.

Parameters:

  theToken | next token string

void StringTokenizer::reset | ( |  | ) |

## Member Data Documentation

const XalanDOMChar StringTokenizer::s_defaultTokens[]`[static]`

The documentation for this class was generated from the following file:

- StringTokenizer.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.