Simple string parser.
More...
#include <Puma/common/SimpleParser.h>
|
| static string | strip (const string &str) |
| | Remove enclosing double-quotes from a string. More...
|
| |
| static int | tokenize (const string &str, vector< string > &tokens, const string &delimiters=" ") |
| | Splits a given string into tokens recognized by the given delimiters. More...
|
| |
| static string Puma::SimpleParser::strip |
( |
const string & |
str | ) |
|
|
static |
Remove enclosing double-quotes from a string.
- Parameters
-
- Returns
- String without the enclosing double-quotes.
| static int Puma::SimpleParser::tokenize |
( |
const string & |
str, |
|
|
vector< string > & |
tokens, |
|
|
const string & |
delimiters = " " |
|
) |
| |
|
static |
Splits a given string into tokens recognized by the given delimiters.
- Parameters
-
| str | The string to split. |
| tokens | A vector for the tokens. |
| delimiters | A string with the delimiters. Default is a space or tab. |
- Returns
- Number of recognized tokens.