| 40 | } |
| 41 | |
| 42 | std::string StringConverter::stringToUpper(const char *str) { |
| 43 | std::string result(str); |
| 44 | std::size_t i = 0; |
| 45 | while (*str) { |
| 46 | if (std::islower(*str)) { |
| 47 | result[i] = static_cast<char>(std::toupper(*str)); |
| 48 | } |
| 49 | ++str; |
| 50 | ++i; |
| 51 | } |
| 52 | return result; |
| 53 | } |
| 54 | |
| 55 | std::string StringConverter::stringToUpper(const std::string &str) { |
| 56 | return stringToUpper(str.c_str()); |
nothing calls this directly
no outgoing calls
no test coverage detected