| Index: base/string_util.h
|
| ===================================================================
|
| --- base/string_util.h (revision 29143)
|
| +++ base/string_util.h (working copy)
|
| @@ -251,6 +251,7 @@
|
| // borrowed from the equivalent APIs in Mozilla.
|
| bool LowerCaseEqualsASCII(const std::string& a, const char* b);
|
| bool LowerCaseEqualsASCII(const std::wstring& a, const char* b);
|
| +bool LowerCaseEqualsASCII(const string16& a, const char* b);
|
|
|
| // Same thing, but with string iterators instead.
|
| bool LowerCaseEqualsASCII(std::string::const_iterator a_begin,
|
| @@ -259,12 +260,18 @@
|
| bool LowerCaseEqualsASCII(std::wstring::const_iterator a_begin,
|
| std::wstring::const_iterator a_end,
|
| const char* b);
|
| +bool LowerCaseEqualsASCII(string16::const_iterator a_begin,
|
| + string16::const_iterator a_end,
|
| + const char* b);
|
| bool LowerCaseEqualsASCII(const char* a_begin,
|
| const char* a_end,
|
| const char* b);
|
| bool LowerCaseEqualsASCII(const wchar_t* a_begin,
|
| const wchar_t* a_end,
|
| const char* b);
|
| +bool LowerCaseEqualsASCII(const char16* a_begin,
|
| + const char16* a_end,
|
| + const char* b);
|
|
|
| // Performs a case-sensitive string compare. The behavior is undefined if both
|
| // strings are not ASCII.
|
| @@ -277,11 +284,17 @@
|
| bool StartsWith(const std::wstring& str,
|
| const std::wstring& search,
|
| bool case_sensitive);
|
| +bool StartsWith(const string16& str,
|
| + const string16& search,
|
| + bool case_sensitive);
|
|
|
| // Returns true if str ends with search, or false otherwise.
|
| bool EndsWith(const std::wstring& str,
|
| const std::wstring& search,
|
| bool case_sensitive);
|
| +bool EndsWith(const string16& str,
|
| + const string16& search,
|
| + bool case_sensitive);
|
|
|
|
|
| // Determines the type of ASCII character, independent of locale (the C
|
| @@ -467,6 +480,8 @@
|
| template<typename Char> struct CaseInsensitiveCompare {
|
| public:
|
| bool operator()(Char x, Char y) const {
|
| + // TODO(darin): Do we really want to do locale sensitive comparisons here?
|
| + // See http://crbug.com/24917
|
| return tolower(x) == tolower(y);
|
| }
|
| };
|
|
|