dbp::tokenize Class Reference

Split the string to tokens. More...

#include <strutils.h>

List of all members.

Public Member Functions

strings operator() (const std::string &source, const char *delims=",;")
 Split a string to a vector of tokens.
void operator() (const std::string &source, std::string &left, std::string &right, const char *delims="/\\")
 Split a string to a token pair.

Detailed Description

Split the string to tokens.

The tokenize functor class splits a string by a delimiting characters to a separate tokens.


Member Function Documentation

void dbp::tokenize::operator() ( const std::string &  source,
std::string &  left,
std::string &  right,
const char *  delims = "/\\" 
)

Split a string to a token pair.

Delimiting characters are searching from the end of the string to the beginning. If one is found, string is splitting into pair of a tokens.

Parameters:
source a source string
left (out) the first element of tokens pair
right (out) the second element of tokens pair
delims an optional delimiting characters
strings dbp::tokenize::operator() ( const std::string &  source,
const char *  delims = ",;" 
)

Split a string to a vector of tokens.

Parameters:
source a source string
delims an optional delimiting characters
Returns:
a vector of tokens

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

 
Support This Project
SourceForge.net Logo