Add wxUILocale::CompareStrings() function
This function allows comparing strings using the sort order of the specified locale, represented by the new wxLocaleIdent class. It is implemented using CompareStringEx()[1] under MSW and NSString::compare:options:range:locale:[2] under macOS, generic implementation for the other platforms is upcoming. [1]: https://docs.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-comparestringex [2]: https://developer.apple.com/documentation/foundation/nsstring/1414561-compare?language=objc
This commit is contained in:
committed by
Vadim Zeitlin
parent
9f43ec03e6
commit
c8269210a2
@@ -45,6 +45,10 @@ public:
|
||||
wxString GetInfo(wxLocaleInfo index,
|
||||
wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT) const;
|
||||
|
||||
// Compares two strings, for a locale specified by wxLocaleIdent.
|
||||
static int CompareStrings(const wxString& lhs, const wxString& rhs,
|
||||
const wxLocaleIdent& localeId = wxLocaleIdent());
|
||||
|
||||
// Note that this class is not supposed to be used polymorphically, hence
|
||||
// its dtor is not virtual.
|
||||
~wxUILocale();
|
||||
|
Reference in New Issue
Block a user