Documentation
















  Site Hosted by:

SourceForge.net Logo


Support This Project


ad::StringTokenizer Class Reference

Parse a string into a vector of tokens. More...

#include <StringTokenizer.h>

Inherits std::vector< std::string >.

Inheritance diagram for ad::StringTokenizer:

Inheritance graph
[legend]
Collaboration diagram for ad::StringTokenizer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 StringTokenizer (const std::string &str, const std::string &delimiters=" ,\t\n")
 Construct the list from an input string.

Detailed Description

Parse a string into a vector of tokens.

This takes a string, chops it up at the delimiters, and becomes an array of strings containing the result.


Constructor & Destructor Documentation

ad::StringTokenizer::StringTokenizer const std::string &  str,
const std::string &  delimiters = " ,\t\n"
 

Construct the list from an input string.

The default delimiters are space, comma, tab, and newline (" ,\t\n"). You can specifiy alternate delimiters in the string delimiters with a character for each delimiter. Delimiters are not included in the resulting tokens, and are limited to one character.


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

© Copyright 2005 John Butterfield.
All Rights Reserved.