StrSplit overloads
Declared in <absl/strings/str_split.h>
Splits a string into a sequence of substrings identified by Delimiter. 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. StrSplit() returns a lazy range that preserves the substrings original order and is convertible to the collection type specified by the caller.
template<typename Delimiter>
/* implementation-defined */::Splitter</* implementation-defined */::type, AllowEmpty, std::string_view>
StrSplit(
/* implementation-defined */::ConvertibleToStringView text,
Delimiter d);
» more...
Overload of StrSplit() that takes ownership of a std::string input.
template<
typename Delimiter,
typename StringType,
EnableSplitIfString<StringType> = 0>
/* implementation-defined */::Splitter</* implementation-defined */::type, AllowEmpty, std::string>
StrSplit(
StringType&& text,
Delimiter d);
» more...
Overload of StrSplit() that filters substrings with a Predicate.
template<
typename Delimiter,
typename Predicate>
/* implementation-defined */::Splitter</* implementation-defined */::type, Predicate, std::string_view>
StrSplit(
/* implementation-defined */::ConvertibleToStringView text,
Delimiter d,
Predicate p);
» more...
Overload of StrSplit() that takes ownership of a std::string input and filters substrings with a Predicate.
template<
typename Delimiter,
typename Predicate,
typename StringType,
EnableSplitIfString<StringType> = 0>
/* implementation-defined */::Splitter</* implementation-defined */::type, Predicate, std::string>
StrSplit(
StringType&& text,
Delimiter d,
Predicate p);
» more...
| Name | Description |
|---|---|
| text | The string to split. |
| d | The delimiter identifying the split points. |
| p | The predicate that decides whether a substring is included. |