isupper() and tolower() are declared in <ctype.h>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15016 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-07-20 00:52:16 +00:00
parent 61114619bc
commit 497b52f381
2 changed files with 6 additions and 6 deletions

View File

@ -16,6 +16,7 @@
#include "Support/DataTypes.h"
#include <string>
#include <ctype.h>
#include <stdio.h>
namespace llvm {
@ -51,7 +52,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) {
}
if (isNeg) *--BufPtr = '-'; // Add negative sign...
return std::string(BufPtr);
}
@ -98,9 +98,9 @@ static inline std::string ftostr(double V) {
}
static inline std::string LowercaseString(const std::string &S) {
std::string result (S);
std::string result(S);
for (unsigned i = 0; i < S.length(); ++i)
if (isupper (result[i]))
if (isupper(result[i]))
result[i] = (char)tolower(result[i]);
return result;
}

View File

@ -16,6 +16,7 @@
#include "Support/DataTypes.h"
#include <string>
#include <ctype.h>
#include <stdio.h>
namespace llvm {
@ -51,7 +52,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) {
}
if (isNeg) *--BufPtr = '-'; // Add negative sign...
return std::string(BufPtr);
}
@ -98,9 +98,9 @@ static inline std::string ftostr(double V) {
}
static inline std::string LowercaseString(const std::string &S) {
std::string result (S);
std::string result(S);
for (unsigned i = 0; i < S.length(); ++i)
if (isupper (result[i]))
if (isupper(result[i]))
result[i] = (char)tolower(result[i]);
return result;
}