Do not use wxRegEx in wxCmpNaturalGeneric()

Using wxRegEx in wxCmpNaturalGeneric() introduced a dependency of the
base library on the regex library.

Replace wxRegEx with character classification functions wxIsspace(),
wxIspunct(), and wxIsdigit() to remove this rather unnecessary
dependency.

Closes https://github.com/wxWidgets/wxWidgets/pull/2014
This commit is contained in:
PB
2020-08-06 15:42:23 +02:00
committed by Vadim Zeitlin
parent 8e2aad2621
commit a4647825cb
3 changed files with 35 additions and 49 deletions

View File

@@ -486,9 +486,6 @@ int wxCmpNatural(const wxString& s1, const wxString& s2);
/**
This is wxWidgets' own implementation of the natural sort comparison function.
Requires wxRegEx, if it is unavailable numbers within strings are not
recognised and only case-insensitive collation is performed.
@see wxCmpNatural()
@since 3.1.4