mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 20:20:03 +00:00
Add an uppercase conversion utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a4c791072f
commit
c5ccbdbe32
@ -109,6 +109,14 @@ static inline std::string LowercaseString(const std::string &S) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline std::string UppercaseString(const std::string &S) {
|
||||
std::string result(S);
|
||||
for (unsigned i = 0; i < S.length(); ++i)
|
||||
if (islower(result[i]))
|
||||
result[i] = char(toupper(result[i]));
|
||||
return result;
|
||||
}
|
||||
|
||||
/// StringsEqualNoCase - Return true if the two strings are equal, ignoring
|
||||
/// case.
|
||||
static inline bool StringsEqualNoCase(const std::string &LHS,
|
||||
|
Loading…
Reference in New Issue
Block a user