wreport::str::Split Struct Reference

Split a string where a given substring is found. More...

`#include <string.h>`

## Data Structures

class | const_iterator

## Public Member Functions

| Split (const std::string &str, const std::string &sep, bool skip_empty=false)
const_iterator | begin ()
| Return the begin iterator to split a string on instances of sep.
const_iterator | end ()
| Return the end iterator to string split.

## Data Fields

std::string | str
| String to split.
std::string | sep
| Separator.
bool | skip_empty
| If true, skip empty tokens, effectively grouping consecutive separators as if they were a single one.

## Detailed Description

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(my_string, "/");
vector<string> split;
std::copy(splitter.begin(), splitter.end(), back_inserter(split));
wreport::str::Split
Split a string where a given substring is found.
Definition string.h:157

The documentation for this struct was generated from the following file:

- string.h