Return a capitalized string (i.e the first letter is uppercased, all other are lowercased)
| 1652 | // Return a capitalized string (i.e the first letter is uppercased, all other |
| 1653 | // are lowercased) |
| 1654 | std::string SystemTools::Capitalized(std::string const& s) |
| 1655 | { |
| 1656 | std::string n; |
| 1657 | if (s.empty()) { |
| 1658 | return n; |
| 1659 | } |
| 1660 | n.resize(s.size()); |
| 1661 | n[0] = static_cast<std::string::value_type>(kwsysString_toupper(s[0])); |
| 1662 | for (size_t i = 1; i < s.size(); i++) { |
| 1663 | n[i] = static_cast<std::string::value_type>(kwsysString_tolower(s[i])); |
| 1664 | } |
| 1665 | return n; |
| 1666 | } |
| 1667 | |
| 1668 | // Return capitalized words |
| 1669 | std::string SystemTools::CapitalizedWords(std::string const& s) |
nothing calls this directly
no test coverage detected