mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-01-09 21:21:16 +00:00
Replace (Lower|Upper)caseString in favor of StringRef's newest methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143891 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -117,22 +117,6 @@ static inline std::string ftostr(const APFloat& V) {
|
||||
return "<unknown format in ftostr>"; // error
|
||||
}
|
||||
|
||||
static inline 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] = char(tolower(result[i]));
|
||||
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;
|
||||
}
|
||||
|
||||
/// StrInStrNoCase - Portable version of strcasestr. Locates the first
|
||||
/// occurrence of string 's1' in string 's2', ignoring case. Returns
|
||||
/// the offset of s2 in s1 or npos if s2 cannot be found.
|
||||
|
||||
Reference in New Issue
Block a user