[#util-Split-09] = xref:util.adoc[util]::Split :relfileprefix: ../ :mrdocs: Split a string on every instance of sep, returning a vector. == Synopsis Declared in `<util/string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T = std::span<char const>> std::vector<T> Split( std::span<char const> const& sp, char sep, bool include_sep = false); ---- == Description If sep does not occur in sp, a singleton with the entirety of sp is returned. Note that this function does not care about braces, so splitting "foo(bar(1),2),3) on ',' will return {"foo(bar(1)", "2)", "3)"}. == Return Value The pieces of sp between occurrences of sep. == Parameters [cols="1,4"] |=== | Name| Description | *sp* [in] | The input character range to split. | *sep* [in] | Single character that splits the input. | *include_sep* [in] | Whether to include the separator at the end of the left side of the splits. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#