[#absl-MaxSplits] = xref:absl.adoc[absl]::MaxSplits :relfileprefix: ../ :mrdocs: A delimiter that limits the number of matches which can occur to the passed `limit`. == Synopsis Declared in `<absl/strings/str_split.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename Delimiter> /* implementation-defined */ MaxSplits( Delimiter delimiter, int limit); ---- == Description The last element in the returned collection will contain all remaining unsplit pieces, which may contain instances of the delimiter. The collection will contain at most `limit` + 1 elements. Example: using absl::MaxSplits; std::vector<std::string> v = absl::StrSplit("a,b,c", MaxSplits(',', 1)); // v[0]== "a", v[1]== "b,c" == Return Value A delimiter wrapping `delimiter` with the given match limit. == Parameters [cols="1,4"] |=== | Name| Description | *delimiter* | The underlying delimiter whose matches are limited. | *limit* | The maximum number of matches allowed. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#