[#util-SplitString-0e]
= xref:util.adoc[util]::SplitString
:relfileprefix: ../
:mrdocs:

`SplitString` overloads

== Synopses

Declared in `&lt;util&sol;string&period;h&gt;`

Split a string on a single separator character, returning strings&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
std::vector&lt;std::string&gt;
xref:util/SplitString-0b.adoc[SplitString](
    std::string&lowbar;view str,
    char sep);
----

[.small]#xref:util/SplitString-0b.adoc[_» more&period;&period;&period;_]#

Split a string on any of the given separator characters, returning strings&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
std::vector&lt;std::string&gt;
xref:util/SplitString-08.adoc[SplitString](
    std::string&lowbar;view str,
    std::string&lowbar;view separators);
----

[.small]#xref:util/SplitString-08.adoc[_» more&period;&period;&period;_]#

== Return Value

* The pieces of str between occurrences of sep&period;
* The pieces of str between separators&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| Input string to split&period;
| *sep*
| Separator character&period;
| *separators*
| Set of characters, any of which splits the input&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
