13 std::ostringstream output;
15 for (
size_t index = 0; index < s.size(); index++)
19 if (std::isspace(c) || !std::isalpha(c))
22 output << s.substr(index);
35 output << static_cast<char>(c);
Declaration of the titlecase() function, for making a word lowercase with the first letter uppercase.
The namespace containing all the "helper" functions in the C++ code.
std::string titlecase(const std::string &s)
Convert the first word (or only word) in the given string to lowercase then make the first letter upp...