Posted on 2007-06-02 13:22 by Timo at Permlink with Comments. Tags: std::string c++ code-snippet
This post completes the small C++ function collection of simple STL string manipulations. The following code snippet shows simple locale-unware uppercase and lowercase conversion functions using tolower and toupper. Nothing revolutionary; I'm just misusing this weblog as a code-paste dump for reuseable code.
Sometimes it is better to have a case-insensitive string class. More about ci_string can be found at Guru of the Week (GotW) #29: Case-Insensitive Strings.
Comment by Timo at 2007-12-20 14:19 UTC - http://idlebox.net/
Yes, this is nothing new or innovative. The Boost.String library is way more flexible and includes many more algorithms. Nevertheless these are the code snippets I copy into programs, when I don't want to include the huge Boost library and just want plain ASCII case-conversions.
Comment by fdv1 at 2007-12-19 14:35 UTC
Hi Timo, Thanks for your example of Flex Bison C++ Unless I'm wrong what you provide in this section is already implemeted in : Boost String Algorithms Library cheers François