tolower function for C++ strings -
Is there a built-in function for converting C ++ strings from upper case letters to lowercase letters? If it is not converted to seestring and is the only option to use a toller on each variable?
Thank you very much earlier.
If boost
is an option:
< Code> #include & lt; Boost / algorithm / string.hpp & gt; Std :: string str = "wHatEver"; Promote: to_lower (STR);
Otherwise, you can use std :: transform
:
std :: string str = "wHatEver" ; Std :: conversion (str.begin (), str.end (), str.begin (), :: tolower);
If you have some custom locale-aware tolower
you can also use another function.
Comments
Post a Comment