| 152 | } |
| 153 | |
| 154 | std::string no_whitespace(const std::string& s) { |
| 155 | const int sourcesize = (int)s.size(); |
| 156 | |
| 157 | int count = 0, i = 0, j = 0; |
| 158 | for (i = 0; i < sourcesize; i++) |
| 159 | if (!isWhitespace(s[i])) { |
| 160 | count++; |
| 161 | } |
| 162 | |
| 163 | // create result string of correct size |
| 164 | std::string result(count, ' '); |
| 165 | |
| 166 | for (i = 0, j = 0; i < sourcesize; i++) |
| 167 | if (!isWhitespace(s[i])) { |
| 168 | result[j++] = s[i]; |
| 169 | } |
| 170 | |
| 171 | return result; |
| 172 | } |
| 173 | |
| 174 | const std::string& tolower(const std::string& s, std::string& dest) { |
| 175 | for (std::string::const_iterator i = s.begin(), end = s.end(); i != end; ++i) { |
no test coverage detected