wibble 0.1.28
|
Split a string where a given substring is found. More...
#include <string.h>
Classes | |
class | const_iterator |
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 |
Split a string where a given substring is found.
This does a similar work to the split functions of perl, python and ruby.
Example code:
str::Split splitter("/", myString);
vector<string> split;
std::copy(splitter.begin(), splitter.end(), back_inserter(split));
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] |
Split the string and iterate the resulting tokens.
Referenced by wibble::str::normpath(), and wibble::net::http::Params::parse_urlencoded().
const_iterator wibble::str::Split::end | ( | ) | const [inline] |
Referenced by wibble::str::normpath(), and wibble::net::http::Params::parse_urlencoded().