[Support] Merge toLower / toUpper implementations

Merge the ones from StringRef and StringExtras.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319171 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Francis Visoiu Mistrih
2017-11-28 14:22:27 +00:00
parent accb337c76
commit 45ff225c4c
3 changed files with 35 additions and 27 deletions
+6
View File
@@ -13,6 +13,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
/// StrInStrNoCase - Portable version of strcasestr. Locates the first
@@ -56,3 +57,8 @@ void llvm::SplitString(StringRef Source,
S = getToken(S.second, Delimiters);
}
}
void llvm::printLowerCase(StringRef String, raw_ostream &Out) {
for (const char C : String)
Out << toLower(C);
}