about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-12-02T03·50-0800
committerAlex Strelnikov <strel@google.com>2017-12-04T14·58-0500
commitf4f91f421635276ba1eb4580c117edc38389e54b (patch)
treebbe3ca247e35aee4eacdf9a7185c819fb35987d2
parent8b727aa7aba86ce396da8e4886e40ea3e4357e27 (diff)
Changes imported from Abseil "staging" branch:
  - 1dde8a2a1868c32b32d62fba62eb37974f656948 Correct usage of CUnescape() in example. by Abseil Team <absl-team@google.com>

GitOrigin-RevId: 1dde8a2a1868c32b32d62fba62eb37974f656948
Change-Id: I5183a74a3c682ac55b2bf4be0d871375e1302aae
-rw-r--r--absl/strings/escaping.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/absl/strings/escaping.h b/absl/strings/escaping.h
index 05327e7c43a6..23444a987495 100644
--- a/absl/strings/escaping.h
+++ b/absl/strings/escaping.h
@@ -64,7 +64,10 @@ namespace absl {
 // Example:
 //
 //   std::string s = "foo\\rbar\\nbaz\\t";
-//   std::string unescaped_s = absl::CUnescape(s);
+//   std::string unescaped_s;
+//   if (!absl::CUnescape(s, &unescaped_s) {
+//     ...
+//   }
 //   EXPECT_EQ(unescaped_s, "foo\rbar\nbaz\t");
 bool CUnescape(absl::string_view source, std::string* dest, std::string* error);