omni::extras::split
Defined in omni/extras/StringHelpers.h
-
inline std::vector<std::string> omni::extras::split(const std::string &s, char d, size_t count = std::numeric_limits<size_t>::max())
Splits a string based on a delimiter.
- Parameters
s – The string to split
d – The delimiter character
count – The maximum number of sections to split
sinto
- Returns
a
std::vectorof strings that have been split fromsat delimiterd. The delimiter is not included in the strings. Adjacent delimiters do not produce empty strings in the returned vector. Up tocountentries will be in the returned vector. e.g."a.b..c.dee."would produce{ "a", "b", "c", "dee" }assuming thatdis.andcountis >= 4.