64 unsigned int len = length();
65 if (len != other.length())
return false;
66 for (
unsigned int i = 0; i < len; i++) {
67 if (tolower((*
this)[i]) != tolower(other[i])) {
95 const std::string& old,
const std::string& newString) {
107 if (size() == 0)
return "";
108 if (size() == 1)
return upper();
113 std::vector<TCEString>
163 std::string newStr(str);
169 for (
size_t i = 0; i < str.size(); i++) {
170 str.at(i) = std::toupper(str.at(i), loc);
177 for (
size_t i = 0; i < str.size(); i++) {
178 str.at(i) = std::toupper(str.at(i), loc);
185 const std::string& str,
const std::locale& loc) {
186 std::string result(str);
187 for (
size_t i = 0; i < result.size(); i++) {
188 result.at(i) = std::tolower(result.at(i), loc);
203 if (!toAppend.empty()) {
204 return toAppend += appender;
221 std::string tmp(toAppend);
242 return applyIf(expression, ifTrue,
"");
253 const std::string& oldPattern,
254 const std::string& newPattern) {
256 unsigned replacementCount = 0;
258 std::string::size_type location = str.find(oldPattern);
259 while (location != std::string::npos) {
261 str.begin() + location,
262 str.begin() + location + oldPattern.length(),
268 location = str.find(oldPattern, location + newPattern.length());
270 return replacementCount;
280 result.reserve(str.size());
282 if (std::isdigit(c)) result += c;