Puma Reference Manual Puma: Puma::SimpleParser Class Reference



Puma::SimpleParser Class Reference

Simple string parser. More...

#include <Puma/common/SimpleParser.h>

Inherited by Puma::OptsParser.

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:
str The 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:
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.



Puma Reference Manual. Created on 24 Nov 2009.