MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / stringToUpper

Method stringToUpper

src/StringConverter.cpp:42–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42std::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
55std::string StringConverter::stringToUpper(const std::string &str) {
56 return stringToUpper(str.c_str());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected