llvm.org GIT mirror llvm / c5ccbdb
Add an uppercase conversion utility function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43146 91177308-0d34-0410-b5e6-96231b3b80d8 Christopher Lamb 12 years ago
1 changed file(s) with 8 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
108108 return result;
109109 }
110110
111 static inline std::string UppercaseString(const std::string &S) {
112 std::string result(S);
113 for (unsigned i = 0; i < S.length(); ++i)
114 if (islower(result[i]))
115 result[i] = char(toupper(result[i]));
116 return result;
117 }
118
111119 /// StringsEqualNoCase - Return true if the two strings are equal, ignoring
112120 /// case.
113121 static inline bool StringsEqualNoCase(const std::string &LHS,