* @brief Converts all characters in @a str to lower case. * * For example, "Crazy Willy" is converted into "crazy willy" . */
| 370 | * For example, <tt>"Crazy Willy"</tt> is converted into <tt>"crazy willy"</tt>. |
| 371 | */ |
| 372 | std::string toLower(std::string str) { |
| 373 | std::transform(str.begin(), str.end(), str.begin(), |
| 374 | [](const unsigned char c) { return std::tolower(c); }); |
| 375 | return str; |
| 376 | } |
| 377 | |
| 378 | /** |
| 379 | * @brief Converts all characters in @a str to upper case. |