25 # ifndef DSGSTRINGUTILITIES_H 26 # define DSGSTRINGUTILITIES_H 32 template <
typename T>
class DynArray;
34 template <
typename ContainerType = DynArray<std::
string>>
35 ContainerType
split_string(
const std::string &,
const std::string &);
37 template <
typename ContainerType>
38 ContainerType
split_string(
const std::string & str,
const std::string & sep)
42 size_t sep_sz = sep.size();
45 size_t end = str.find(sep);
47 while (end != std::string::npos)
49 ss.append(str.substr(beg, end - beg));
51 end = str.find(sep, beg);
54 ss.append(str.substr(beg, str.size() - beg));
61 # endif // DSGSTRINGUTILITIES_H ContainerType split_string(const std::string &, const std::string &)
Definition: stringutilities.H:38