Export of internal Abseil changes.

--
f4bb8afa9376b4120f56f3beff7b07260da4a5c2 by CJ Johnson <johnsoncj@google.com>:

Add user to Github list

PiperOrigin-RevId: 209630262
GitOrigin-RevId: f4bb8afa9376b4120f56f3beff7b07260da4a5c2
Change-Id: I3fedf35011d805ee4a20b92e073b43523b47d15b
This commit is contained in:
Abseil Team 2018-08-21 11:31:02 -07:00 committed by Derek Mauro
parent fefc83638f
commit bed5bd6e18
54 changed files with 302 additions and 302 deletions

View file

@ -17,7 +17,7 @@
// File: match.h
// -----------------------------------------------------------------------------
//
// This file contains simple utilities for performing std::string matching checks.
// This file contains simple utilities for performing string matching checks.
// All of these function parameters are specified as `absl::string_view`,
// meaning that these functions can accept `std::string`, `absl::string_view` or
// nul-terminated C-style strings.
@ -41,14 +41,14 @@ namespace absl {
// StrContains()
//
// Returns whether a given std::string `haystack` contains the substring `needle`.
// Returns whether a given string `haystack` contains the substring `needle`.
inline bool StrContains(absl::string_view haystack, absl::string_view needle) {
return haystack.find(needle, 0) != haystack.npos;
}
// StartsWith()
//
// Returns whether a given std::string `text` begins with `prefix`.
// Returns whether a given string `text` begins with `prefix`.
inline bool StartsWith(absl::string_view text, absl::string_view prefix) {
return prefix.empty() ||
(text.size() >= prefix.size() &&
@ -57,7 +57,7 @@ inline bool StartsWith(absl::string_view text, absl::string_view prefix) {
// EndsWith()
//
// Returns whether a given std::string `text` ends with `suffix`.
// Returns whether a given string `text` ends with `suffix`.
inline bool EndsWith(absl::string_view text, absl::string_view suffix) {
return suffix.empty() ||
(text.size() >= suffix.size() &&
@ -68,13 +68,13 @@ inline bool EndsWith(absl::string_view text, absl::string_view suffix) {
// StartsWithIgnoreCase()
//
// Returns whether a given std::string `text` starts with `starts_with`, ignoring
// Returns whether a given string `text` starts with `starts_with`, ignoring
// case in the comparison.
bool StartsWithIgnoreCase(absl::string_view text, absl::string_view prefix);
// EndsWithIgnoreCase()
//
// Returns whether a given std::string `text` ends with `ends_with`, ignoring case
// Returns whether a given string `text` ends with `ends_with`, ignoring case
// in the comparison.
bool EndsWithIgnoreCase(absl::string_view text, absl::string_view suffix);