#include <string.h>
This does a similar work to the split functions of perl, python and ruby.
Example code:
str::Split splitter("/");
vector<string> split;
std::copy(splitter.begin(myString), splitter.end(), back_inserter(split));
Public Member Functions | |
Split (const std::string &sep, const std::string &str) | |
Create a splitter that uses the given regular expression to find tokens. | |
const_iterator | begin () const |
Split the string and iterate the resulting tokens. | |
const_iterator | end () const |
Classes | |
class | const_iterator |
wibble::str::Split::Split | ( | const std::string & | sep, | |
const std::string & | str | |||
) | [inline] |
Create a splitter that uses the given regular expression to find tokens.
const_iterator wibble::str::Split::begin | ( | ) | const [inline] |
const_iterator wibble::str::Split::end | ( | ) | const [inline] |
Referenced by wibble::str::normpath().