Commit 23ef7e11 by Abseil Team Committed by Alex Strelnikov

Changes imported from Abseil "staging" branch:

  - 50eadebdcad56fe50e8070b94497568c74175b28 Correct an example for StrSplit in the comments and chang... by Abseil Team <absl-team@google.com>

GitOrigin-RevId: 50eadebdcad56fe50e8070b94497568c74175b28
Change-Id: I2b12ce54e7d9db05ee15904801498f59e20e5d23
parent 94f0f79e
...@@ -402,7 +402,7 @@ struct SkipWhitespace { ...@@ -402,7 +402,7 @@ struct SkipWhitespace {
// //
// std::vector<std::string> v = absl::StrSplit(" a , ,,b,", // std::vector<std::string> v = absl::StrSplit(" a , ,,b,",
// ',', SkipWhitespace()); // ',', SkipWhitespace());
// // v[0] == "a", v[1] == "b" // // v[0] == " a ", v[1] == "b"
// //
// See above for more information on predicates. // See above for more information on predicates.
// //
......
...@@ -154,8 +154,8 @@ TEST(Split, APIExamples) { ...@@ -154,8 +154,8 @@ TEST(Split, APIExamples) {
{ {
// Uses the SkipWhitespace predicate. // Uses the SkipWhitespace predicate.
using absl::SkipWhitespace; using absl::SkipWhitespace;
std::vector<std::string> v = absl::StrSplit("a, ,,b,", ',', SkipWhitespace()); std::vector<std::string> v = absl::StrSplit(" a , ,,b,", ',', SkipWhitespace());
EXPECT_THAT(v, ElementsAre("a", "b")); EXPECT_THAT(v, ElementsAre(" a ", "b"));
} }
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment