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

Static Public Member Functions

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...
 

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.



Puma Reference Manual. Created on Tue Jan 19 2016.