libshevek
|
Split a string into words and retrieve them individually. More...
#include <split.hh>
Public Member Functions | |
split (std::string const &str=std::string()) | |
Create a new split object, and optionally load it with data. | |
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. | |
std::string | operator[] (unsigned idx) const |
Get a word from the split object. | |
split | sub (unsigned from) const |
Get a new split object containing only the last part of this one. |
Split a string into words and retrieve them individually.
|
inline |
Get a word from the split object.
This differs from std::vector's method in that it returns an empty string if idx is out of range.