| 138 | // to_upper_case("ChaRacTer&WorDs34") == "CHARACTER&WORDS34" |
| 139 | template <typename String> |
| 140 | String to_upper_case(const String& str) |
| 141 | { |
| 142 | typedef typename String::value_type Char; |
| 143 | return transform([](Char c) -> Char { |
| 144 | return static_cast<Char>( |
| 145 | std::toupper(static_cast<unsigned char>(c))); |
| 146 | }, |
| 147 | str); |
| 148 | } |
| 149 | |
| 150 | // API search type: to_upper_case_loc : (Locale, String) -> String |
| 151 | // fwd bind count: 1 |
no test coverage detected