MVE - Multi-View Environment mve-devel
|
Simple tokenizer. More...
#include <tokenizer.h>
Public Member Functions | |
std::string | concat (std::size_t pos, std::size_t num=0) const |
Concatenates 'num' tokens with a space character starting from token at position 'pos'. | |
template<typename T > | |
T | get_as (std::size_t pos) const |
Returns the requested token as the specified type. | |
void | parse_cmd (std::string const &str) |
A tokenizer that parses shell commands into tokens. | |
void | split (std::string const &str, char delim=' ', bool keep_empty=false) |
Very simple tokenziation at a given delimiter characater. | |
Simple tokenizer.
Reads an input string and splits the string according to some rules. The individual tokens are then stored in the vector baseclass.
Definition at line 28 of file tokenizer.h.
|
inline |
Concatenates 'num' tokens with a space character starting from token at position 'pos'.
Passing '0' as 'num' argument means to concat all remaining tokens.
Definition at line 108 of file tokenizer.h.
|
inline |
Returns the requested token as the specified type.
Definition at line 128 of file tokenizer.h.
|
inline |
A tokenizer that parses shell commands into tokens.
It handles quotes gracefully, placing quoted strings into a single token and removes the quotes.
Definition at line 83 of file tokenizer.h.
|
inline |
Very simple tokenziation at a given delimiter characater.
If requested, subsequent delimiter characters lead to empty tokens.
Definition at line 62 of file tokenizer.h.