18 #ifndef SHEVEK_SPLIT_HH
19 #define SHEVEK_SPLIT_HH
27 class split :
public std::vector <std::string>
31 split (std::string
const &str = std::string ())
36 void load (std::string
const &str,
bool allow_empty =
false, std::string
const &delimiters = std::string (
" \t\v\f\a\n\r\0", 8));
43 return std::string ();
44 return std::vector <std::string>::operator[] (idx);
51 #endif // defined (SHEVEK_SPLIT_HH)
std::string operator[](unsigned idx) const
Get a word from the split object.
Definition: split.hh:40
Split a string into words and retrieve them individually.
Definition: split.hh:27
split(std::string const &str=std::string())
Create a new split object, and optionally load it with data.
Definition: split.hh:31
void load(std::string const &str, bool allow_empty=false, std::string const &delimiters=std::string(" \t\v\f\a\n\r\0", 8))
Load new data into an existing split object.
split sub(unsigned from) const
Get a new split object containing only the last part of this one.