llvm.org GIT mirror llvm / 497b52f
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 Misha Brukman 15 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1515
1616 #include "Support/DataTypes.h"
1717 #include
18 #include
1819 #include
1920
2021 namespace llvm {
5051 }
5152
5253 if (isNeg) *--BufPtr = '-'; // Add negative sign...
53
5454 return std::string(BufPtr);
5555 }
5656
9797 }
9898
9999 static inline std::string LowercaseString(const std::string &S) {
100 std::string result (S);
100 std::string result(S);
101101 for (unsigned i = 0; i < S.length(); ++i)
102 if (isupper (result[i]))
102 if (isupper(result[i]))
103103 result[i] = (char)tolower(result[i]);
104104 return result;
105105 }
1515
1616 #include "Support/DataTypes.h"
1717 #include
18 #include
1819 #include
1920
2021 namespace llvm {
5051 }
5152
5253 if (isNeg) *--BufPtr = '-'; // Add negative sign...
53
5454 return std::string(BufPtr);
5555 }
5656
9797 }
9898
9999 static inline std::string LowercaseString(const std::string &S) {
100 std::string result (S);
100 std::string result(S);
101101 for (unsigned i = 0; i < S.length(); ++i)
102 if (isupper (result[i]))
102 if (isupper(result[i]))
103103 result[i] = (char)tolower(result[i]);
104104 return result;
105105 }