[#absl-StrSplit-07]
= xref:absl.adoc[absl]::StrSplit
:relfileprefix: ../
:mrdocs:

`StrSplit` overloads

== Synopses

Declared in `&lt;absl&sol;strings&sol;str&lowbar;split&period;h&gt;`

Splits a string into a sequence of substrings identified by `Delimiter`&period; The input is processed sequentially from beginning to end, and each resulting substring is filtered by an optional `Predicate` before inclusion in the result set&period; `StrSplit()` returns a lazy range that preserves the substrings original order and is convertible to the collection type specified by the caller&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Delimiter&gt;
&sol;&ast; implementation-defined &ast;&sol;::Splitter&lt;&sol;&ast; implementation-defined &ast;&sol;::type, AllowEmpty, std::string&lowbar;view&gt;
xref:absl/StrSplit-011.adoc[StrSplit](
    &sol;&ast; implementation-defined &ast;&sol;::ConvertibleToStringView text,
    Delimiter d);
----

[.small]#xref:absl/StrSplit-011.adoc[_» more&period;&period;&period;_]#

Overload of `StrSplit()` that takes ownership of a `std&colon;&colon;string` input&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Delimiter,
    typename StringType,
    xref:absl/EnableSplitIfString.adoc[EnableSplitIfString&lt;StringType&gt;] = 0&gt;
&sol;&ast; implementation-defined &ast;&sol;::Splitter&lt;&sol;&ast; implementation-defined &ast;&sol;::type, AllowEmpty, std::string&gt;
xref:absl/StrSplit-02.adoc[StrSplit](
    StringType&& text,
    Delimiter d);
----

[.small]#xref:absl/StrSplit-02.adoc[_» more&period;&period;&period;_]#

Overload of `StrSplit()` that filters substrings with a `Predicate`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Delimiter,
    typename Predicate&gt;
&sol;&ast; implementation-defined &ast;&sol;::Splitter&lt;&sol;&ast; implementation-defined &ast;&sol;::type, Predicate, std::string&lowbar;view&gt;
xref:absl/StrSplit-0d.adoc[StrSplit](
    &sol;&ast; implementation-defined &ast;&sol;::ConvertibleToStringView text,
    Delimiter d,
    Predicate p);
----

[.small]#xref:absl/StrSplit-0d.adoc[_» more&period;&period;&period;_]#

Overload of `StrSplit()` that takes ownership of a `std&colon;&colon;string` input and filters substrings with a `Predicate`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Delimiter,
    typename Predicate,
    typename StringType,
    xref:absl/EnableSplitIfString.adoc[EnableSplitIfString&lt;StringType&gt;] = 0&gt;
&sol;&ast; implementation-defined &ast;&sol;::Splitter&lt;&sol;&ast; implementation-defined &ast;&sol;::type, Predicate, std::string&gt;
xref:absl/StrSplit-01c.adoc[StrSplit](
    StringType&& text,
    Delimiter d,
    Predicate p);
----

[.small]#xref:absl/StrSplit-01c.adoc[_» more&period;&period;&period;_]#

== Return Value

* A lazy range of substrings convertible to the caller&apos;s collection&period;
* A lazy range of the retained substrings&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *text*
| The string to split&period;
| *d*
| The delimiter identifying the split points&period;
| *p*
| The predicate that decides whether a substring is included&period;
|===


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