I have to check if the particular string begins with another one. Strings are encoded using utf8, and a comparison should be case insensitive.
I know that this is very similar to that topic Case insensitive string comparison in C++ but I do not want to use the boost library and I prefer portable solutions (If it is 'nearly' impossible, I prefer Linux oriented solutions).
Is it possible in C++11 using its regexp library? Or just using simple string compare methods?
The only way I know of that is UTF8/internationalization/culture-aware is the excellent and well-maintained IBM ICU: International Components for Unicode. It's a C/C++ library for *nix or Windows into which a ton of research has gone to provide a culture-aware string library, including case-insensitive string comparison that's both fast and accurate.
IMHO, the two things you should never write yourself unless you're doing a thesis paper are encryption and culture-sensitive string libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With