|
libwreport
3.29
|
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. | |
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: