about summary refs log tree commit diff
path: root/absl/strings
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-10-13T17·21-0700
committerjueminyang <jueminyang@google.com>2017-10-16T16·00-0400
commit6de53819a7173bd446156237a37f53464b7732cc (patch)
treebffe391f131d02a8e16a2236ac9b89856b7fc012 /absl/strings
parent1a9ba5e2e5a14413704f0c913fac53359576d3b6 (diff)
Changes imported from Abseil "staging" branch:
  - 432508bf64998983b3c194d5f164872ce3c2e573 Put visibility tags into absl external build files by Jon Cohen <cohenjon@google.com>
  - 25d59d11e7b833fe632cddb5bf4d76075ae6282b Use ABSL_PREDICT_TRUE instead of *FALSE for the range che... by Jon Cohen <cohenjon@google.com>
  - 8d8a5890a55ddd19aac849748441eeb57c684f10 Better detection for MSVC support on std::optional. by Xiaoyi Zhang <zhangxy@google.com>
  - c1b31e4a97939885c3bbc23ecb093e9619e73ad1 Internal cleanup by Gennadiy Rozental <rogeeff@google.com>
  - 4f56ad20c4eeccc6f5fb21ec6c7191233d34a090 Internal change. by Matt Calabrese <calabrese@google.com>
  - d2a02b52c75c295708170f4d17b7ff442c8d6a97 Fixed a minor typo in the SimpleAtob() function comment. by Abseil Team <absl-team@google.com>
  - 5adbff5c23a45278d06de2ef3a29ea51b0d1269e Internal cleanup by Gennadiy Rozental <rogeeff@google.com>

GitOrigin-RevId: 432508bf64998983b3c194d5f164872ce3c2e573
Change-Id: I32ddd151d3350b96a22e8f1830f19b59374953ad
Diffstat (limited to 'absl/strings')
-rw-r--r--absl/strings/BUILD.bazel15
-rw-r--r--absl/strings/internal/utf8.h1
-rw-r--r--absl/strings/match.h5
-rw-r--r--absl/strings/numbers.h6
4 files changed, 21 insertions, 6 deletions
diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel
index b26106631f03..49f49abd8d78 100644
--- a/absl/strings/BUILD.bazel
+++ b/absl/strings/BUILD.bazel
@@ -103,6 +103,7 @@ cc_test(
     size = "small",
     srcs = ["match_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "@com_google_googletest//:gtest_main",
@@ -117,6 +118,7 @@ cc_test(
         "internal/escaping_test_common.inc",
     ],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -130,6 +132,7 @@ cc_test(
     size = "small",
     srcs = ["ascii_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -145,6 +148,7 @@ cc_test(
         "internal/memutil_test.cc",
     ],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -159,6 +163,7 @@ cc_test(
         "internal/utf8_test.cc",
     ],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":internal",
         ":strings",
@@ -172,6 +177,7 @@ cc_test(
     size = "small",
     srcs = ["string_view_test.cc"],
     copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:config",
@@ -186,6 +192,7 @@ cc_test(
     size = "small",
     srcs = ["substitute_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -198,6 +205,7 @@ cc_test(
     size = "small",
     srcs = ["str_replace_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "@com_google_googletest//:gtest_main",
@@ -208,6 +216,7 @@ cc_test(
     name = "str_split_test",
     srcs = ["str_split_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -221,6 +230,7 @@ cc_test(
     size = "small",
     srcs = ["internal/ostringstream_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":internal",
         "@com_google_googletest//:gtest_main",
@@ -235,6 +245,7 @@ cc_test(
         "internal/resize_uninitialized_test.cc",
     ],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         "//absl/base:core_headers",
         "//absl/meta:type_traits",
@@ -247,6 +258,7 @@ cc_test(
     size = "small",
     srcs = ["str_join_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -260,6 +272,7 @@ cc_test(
     size = "small",
     srcs = ["str_cat_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base:core_headers",
@@ -278,6 +291,7 @@ cc_test(
     tags = [
         "no_test_loonix",
     ],
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "//absl/base",
@@ -291,6 +305,7 @@ cc_test(
     size = "small",
     srcs = ["strip_test.cc"],
     copts = ABSL_TEST_COPTS,
+    visibility = ["//visibility:private"],
     deps = [
         ":strings",
         "@com_google_googletest//:gtest_main",
diff --git a/absl/strings/internal/utf8.h b/absl/strings/internal/utf8.h
index 705eea7f16ab..5bd82e8427a6 100644
--- a/absl/strings/internal/utf8.h
+++ b/absl/strings/internal/utf8.h
@@ -25,7 +25,6 @@
 #include <cstddef>
 #include <cstdint>
 
-
 namespace absl {
 namespace strings_internal {
 
diff --git a/absl/strings/match.h b/absl/strings/match.h
index 4ac35f192e00..3d54da81d5f0 100644
--- a/absl/strings/match.h
+++ b/absl/strings/match.h
@@ -53,7 +53,7 @@ inline bool StrContains(absl::string_view haystack, absl::string_view needle) {
 inline bool StartsWith(absl::string_view text, absl::string_view prefix) {
   return prefix.empty() ||
          (text.size() >= prefix.size() &&
-         memcmp(text.data(), prefix.data(), prefix.size()) == 0);
+          memcmp(text.data(), prefix.data(), prefix.size()) == 0);
 }
 
 // EndsWith()
@@ -63,7 +63,8 @@ inline bool EndsWith(absl::string_view text, absl::string_view suffix) {
   return suffix.empty() ||
          (text.size() >= suffix.size() &&
           memcmp(text.data() + (text.size() - suffix.size()), suffix.data(),
-  suffix.size()) == 0);
+                 suffix.size()) == 0
+         );
 }
 
 // StartsWithIgnoreCase()
diff --git a/absl/strings/numbers.h b/absl/strings/numbers.h
index 74aebc8028ea..1f3bbcfae596 100644
--- a/absl/strings/numbers.h
+++ b/absl/strings/numbers.h
@@ -62,9 +62,9 @@ ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* value);
 
 // SimpleAtob()
 //
-// Converts the given std::string into into a boolean, returning `true` if
-// successful. The following case-insensitive strings are interpreted as boolean
-// `true`: "true", "t", "yes", "y", "1". The following case-insensitive strings
+// Converts the given std::string into a boolean, returning `true` if successful.
+// The following case-insensitive strings are interpreted as boolean `true`:
+// "true", "t", "yes", "y", "1". The following case-insensitive strings
 // are interpreted as boolean `false`: "false", "f", "no", "n", "0".
 ABSL_MUST_USE_RESULT bool SimpleAtob(absl::string_view str, bool* value);