Puma Reference Manual Puma::SimpleParser Class Reference



Puma::SimpleParser Class Reference

Simple string parser. More...

#include <Puma/common/SimpleParser.h>

Inheritance diagram for Puma::SimpleParser:
Inheritance graph

List of all members.

Static Public Member Functions

static string strip (const string &str)
 Remove enclosing double-quotes from a string.
static int tokenize (const string &str, vector< string > &tokens, const string &delimiters=" ")
 Splits a given string into tokens recognized by the given delimiters.

Detailed Description

Simple string parser.


Member Function Documentation

static string Puma::SimpleParser::strip ( const string &  str) [static]

Remove enclosing double-quotes from a string.

Parameters:
strThe string to strip.
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:
strThe string to split.
tokensA vector for the tokens.
delimitersA string with the delimiters. Default is a space or tab.
Returns:
Number of recognized tokens.