Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a case insensitive compare between two Unicode characters or strings under Windows in C/C++?

I'm looking for a way of doing a insensitive compare of two Unicode characters (char32) under Windows (C/C++, not .NET).

I am aware that the solution is supposed to be locale aware.

I would like a solution that would not require additional third-party libraries.

like image 316
bogdan Avatar asked Nov 18 '25 00:11

bogdan


1 Answers

My first thought is that you should lookup CompareStringEx with its parameters LOCALE_INVARIANT and NORM_IGNORECASE.

like image 158
Johann Gerell Avatar answered Nov 20 '25 14:11

Johann Gerell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!