TF++, Miscellaneous classes and modules in C++:
|
void tfxx::string::gen_split | ( | C & | v, |
const std::string & | s, | ||
const std::string & | delimiter = " " , |
||
const bool & | dropdelimiter = false |
||
) |
template #tf:gen_split#:
The following takes a string and splits it into substrings delimited by #delimiter#. The resulting substrings will be written into a container of strings.
Neither the template mechanism nor the linker mechanism linker is able to deduce the correct function definition from the return value. Hence we have to use the container class template parameter in the functions formal parameter list.
This is the inverse operation to #tf::join#.
v | sequence container that will receive the substrings |
s | string to be split into substrings |
delimiter | string sequence that intersects substrings |
dropdelimiter | if #true# the delimiter itself will be excluded from the output |
#) split string into substrings
Definition at line 112 of file stringfunc.h.
Referenced by main(), range(), rangelist(), and split().