Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2661)

Unified Diff: base/environment.cc

Issue 1878083002: Implement IsAsciiUpper and IsAsciiLower in base/strings/string_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git sync Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/strings/string_util.h » ('j') | components/crash/content/app/breakpad_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/environment.cc
diff --git a/base/environment.cc b/base/environment.cc
index d14ce870bde3a851e9debfd9953f293e0e4e1552..9eef42967b2c71f9d4ac43e209d73370bdc06c98 100644
--- a/base/environment.cc
+++ b/base/environment.cc
@@ -35,9 +35,9 @@ class EnvironmentImpl : public Environment {
// I.e. HTTP_PROXY may be http_proxy for some users/systems.
char first_char = variable_name[0];
std::string alternate_case_var;
- if (first_char >= 'a' && first_char <= 'z')
+ if (IsAsciiLower(first_char))
alternate_case_var = ToUpperASCII(variable_name);
- else if (first_char >= 'A' && first_char <= 'Z')
+ else if (IsAsciiUpper(first_char))
alternate_case_var = ToLowerASCII(variable_name);
else
return false;
« no previous file with comments | « no previous file | base/strings/string_util.h » ('j') | components/crash/content/app/breakpad_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698