]> git.saurik.com Git - wxWidgets.git/commit
Don't use native MSW functions in wxString::CmpNoCase().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Sep 2010 12:52:26 +0000 (12:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Sep 2010 12:52:26 +0000 (12:52 +0000)
commit5858fe6806cd4568c05a493087951fef65e0756e
tree8c3131334f2ddddc1b91cd07c321cf47d9755f43
parent05f68f2f84f9dcacfab853a889d7582454042412
Don't use native MSW functions in wxString::CmpNoCase().

While the native CompareString() is much more efficient than MSVC CRT version
of _wcsicmp(), it gives unexpected results for non-letter characters, so don't
use it but use the slow but correct wxStricmp() instead.

At least don't use char-by-char comparison (in non-UTF-8 case) as it's the
slowest possible implementation of this function, the new one using
wxStricmp() is 3 times faster (by comparison, using CompareString() is 16
times faster still -- but wrong).

Closes #10375.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/string.cpp
tests/strings/strings.cpp