Split the string to tokens. More...
#include <strutils.h>
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. | |
Split the string to tokens.
The tokenize functor class splits a string by a delimiting characters to a separate tokens.
| 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.
| 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.
| source | a source string | |
| delims | an optional delimiting characters |