mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 18:38:37 +00:00
Add a LowercaseString() utility function, courtesy of brg.
llvm-svn: 14383
This commit is contained in:
parent
57b3f07b31
commit
a2b7b5b128
@ -97,6 +97,13 @@ static inline std::string ftostr(double V) {
|
||||
return Buffer;
|
||||
}
|
||||
|
||||
std::string LowercaseString (const std::string &S) {
|
||||
std::string result (S);
|
||||
for (unsigned i = 0; i < S.length(); ++i)
|
||||
if (isupper (result[i]))
|
||||
result[i] = tolower(result[i]);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// getToken - This function extracts one token from source, ignoring any
|
||||
/// leading characters that appear in the Delimiters string, and ending the
|
||||
|
Loading…
x
Reference in New Issue
Block a user