SST/macro
Functions
pst::BasicStringTokenizer Namespace Reference

This nested namespace contains basic functions for std::string parsing. More...

Functions

template<class CharType , class Traits , class StrAlloc , class DqAlloc >
void tokenize (const typename std::basic_string< CharType, Traits, StrAlloc > &str, typename std::deque< typename std::basic_string< CharType, Traits, StrAlloc >, DqAlloc > &tok, const typename std::basic_string< CharType, Traits, StrAlloc > &space=" \t\n")
 A utility function to tokenize a std::string. More...
 
template<class CharType , class Traits , class Alloc >
std::basic_string< CharType, Traits, Alloc > trim (const typename std::basic_string< CharType, Traits, Alloc > &s, const typename std::basic_string< CharType, Traits, Alloc > &spaces=" \t")
 A utility function to trim spaces off a std::string. More...
 

Detailed Description

This nested namespace contains basic functions for std::string parsing.

Function Documentation

template<class CharType , class Traits , class StrAlloc , class DqAlloc >
void pst::BasicStringTokenizer::tokenize ( const typename std::basic_string< CharType, Traits, StrAlloc > &  str,
typename std::deque< typename std::basic_string< CharType, Traits, StrAlloc >, DqAlloc > &  tok,
const typename std::basic_string< CharType, Traits, StrAlloc > &  space = " \t\n" 
)

A utility function to tokenize a std::string.

Original version gleamed off the web some years ago (no licensing or copyright information attached).

Part of the Particle Simulation Toolkit (PST)

Helgi Nov. 27, 2001.

Definition at line 60 of file basic_string_tokenizer.h.

Referenced by sprockit::Factory< T, Args >::add_to_map().

template<class CharType , class Traits , class Alloc >
std::basic_string<CharType, Traits, Alloc> pst::BasicStringTokenizer::trim ( const typename std::basic_string< CharType, Traits, Alloc > &  s,
const typename std::basic_string< CharType, Traits, Alloc > &  spaces = " \t" 
)

A utility function to trim spaces off a std::string.

Taken from the same web page as the simple std::string tokenizer above.

Part of the Particle Simulation Toolkit (PST)

Helgi Nov. 27, 2001.

Definition at line 119 of file basic_string_tokenizer.h.

Referenced by sprockit::prim_printf_type().