C++ , winapi Compare two WCHAR * strings

Hooch picture Hooch · Aug 30, 2011 · Viewed 20.4k times · Source

I want to compare two WCHAR* strings.

How to do it?

P.S. I would like to ignore case while comparing.

I know you can use strcmpi but it id not working for WCHAR*.

Answer

Matthew picture Matthew · Aug 30, 2011

For case sensitive comparison, look at wcscmp

For case insensitive comparison, look at _wcsicmp