From 351086314d46e73d430296c9eca1f6d6c0372cd1 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 24 Apr 2026 15:16:04 -0700 Subject: [PATCH] Update documentation for `absl::StrSplit()` to mention that the input is processed sequentially from beginning to end. PiperOrigin-RevId: 905243329 Change-Id: I9a6fe9be7254ceaeb02f070958f76f622563a028 --- absl/strings/str_split.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/absl/strings/str_split.h b/absl/strings/str_split.h index 29fa4f7d..e9b7378f 100644 --- a/absl/strings/str_split.h +++ b/absl/strings/str_split.h @@ -390,7 +390,7 @@ struct SkipWhitespace { template using EnableSplitIfString = typename std::enable_if::value || - std::is_same::value, + std::is_same::value, int>::type; //------------------------------------------------------------------------------ @@ -399,11 +399,16 @@ using EnableSplitIfString = // StrSplit() // -// Splits a given string based on the provided `Delimiter` object, returning the -// elements within the type specified by the caller. Optionally, you may pass a -// `Predicate` to `StrSplit()` indicating whether to include or exclude the -// resulting element within the final result set. (See the overviews for -// Delimiters and Predicates above.) +// 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. +// +// Optionally, you may pass a `Predicate` to `StrSplit()` indicating whether to +// include or exclude the resulting element within the final result set. (See +// the overviews for Delimiters and Predicates above.) // // Example: //