rcpputils  master
C++ API providing common utilities and data structures.
Namespaces | Functions
split.hpp File Reference

Split string by provided delimiter. More...

#include <iterator>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for split.hpp:

Go to the source code of this file.

Namespaces

 rcpputils
 

Functions

template<class InsertIterator , typename std::enable_if< std::is_same< InsertIterator &, decltype(std::declval< InsertIterator >().operator=(std::declval< std::string >()))>::value , ::type * = nullptr>
void rcpputils::split (const std::string &input, char delim, InsertIterator &it, bool skip_empty=false)
 Split a specified input into tokens using a delimiter and a type erased insert iterator. More...
 
std::vector< std::stringrcpputils::split (const std::string &input, char delim, bool skip_empty=false)
 Split a specified input into tokens using a delimiter. More...
 

Detailed Description

Split string by provided delimiter.