summaryrefslogtreecommitdiffstats
path: root/base/string_util.h
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 04:57:43 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 04:57:43 +0000
commit31fae38c6ce11c9b651f95d2626710f85426dbe8 (patch)
tree20bc17348b69fd74021f5d70f7d2f9c926e8670f /base/string_util.h
parent14fd1a60acdd439f80bdfc0aeb86761ba649db79 (diff)
downloadchromium_src-31fae38c6ce11c9b651f95d2626710f85426dbe8.zip
chromium_src-31fae38c6ce11c9b651f95d2626710f85426dbe8.tar.gz
chromium_src-31fae38c6ce11c9b651f95d2626710f85426dbe8.tar.bz2
Fix clang build by moving ToLowerASCII into base namespace.
BUG=None TEST=trybots Review URL: http://codereview.chromium.org/4371001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r--base/string_util.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/base/string_util.h b/base/string_util.h
index 186679e..c238e4a 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -116,6 +116,12 @@ size_t wcslcpy(wchar_t* dst, const wchar_t* src, size_t dst_size);
// This function is intended to be called from base::vswprintf.
bool IsWprintfFormatPortable(const wchar_t* format);
+// ASCII-specific tolower. The standard library's tolower is locale sensitive,
+// so we don't want to use it here.
+template <class Char> inline Char ToLowerASCII(Char c) {
+ return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c;
+}
+
// Function objects to aid in comparing/searching strings.
template<typename Char> struct CaseInsensitiveCompare {
@@ -275,17 +281,11 @@ bool IsStringASCII(const std::wstring& str);
bool IsStringASCII(const base::StringPiece& str);
bool IsStringASCII(const string16& str);
-// ASCII-specific tolower. The standard library's tolower is locale sensitive,
-// so we don't want to use it here.
-template <class Char> inline Char ToLowerASCII(Char c) {
- return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c;
-}
-
// Converts the elements of the given string. This version uses a pointer to
// clearly differentiate it from the non-pointer variant.
template <class str> inline void StringToLowerASCII(str* s) {
for (typename str::iterator i = s->begin(); i != s->end(); ++i)
- *i = ToLowerASCII(*i);
+ *i = base::ToLowerASCII(*i);
}
template <class str> inline str StringToLowerASCII(const str& s) {