Classes | |
class | wxArrayString |
wxArrayString is an efficient container for storing wxString objects. More... | |
class | wxSortedArrayString |
wxSortedArrayString is an efficient container for storing wxString objects which always keeps the strings in alphabetical order. More... | |
Functions | |
int | wxStringSortAscending (const wxString &s1, const wxString &s2) |
Comparison function comparing strings in alphabetical order. More... | |
int | wxStringSortDescending (const wxString &s1, const wxString &s2) |
Comparison function comparing strings in reverse alphabetical order. More... | |
int | wxDictionaryStringSortAscending (const wxString &s1, const wxString &s2) |
Comparison function comparing strings in dictionary order. More... | |
int | wxDictionaryStringSortDescending (const wxString &s1, const wxString &s2) |
Comparison function comparing strings in reverse dictionary order. More... | |
int | wxNaturalStringSortAscending (const wxString &s1, const wxString &s2) |
Comparison function comparing strings in natural order. More... | |
int | wxNaturalStringSortDescending (const wxString &s1, const wxString &s2) |
Comparison function comparing strings in reverse natural order. More... | |
int | wxCmpNatural (const wxString &s1, const wxString &s2) |
This function compares strings using case-insensitive collation and additionally, numbers within strings are recognised and compared numerically, rather than alphabetically. More... | |
int | wxCmpNaturalGeneric (const wxString &s1, const wxString &s2) |
This is wxWidgets' own implementation of the natural sort comparison function. More... | |
wxArrayString | wxSplit (const wxString &str, const wxChar sep, const wxChar escape='\\') |
Splits the given wxString object using the separator sep and returns the result as a wxArrayString. More... | |
wxString | wxJoin (const wxArrayString &arr, const wxChar sep, const wxChar escape='\\') |
Concatenate all lines of the given wxArrayString object using the separator sep and returns the result as a wxString. More... | |
This function compares strings using case-insensitive collation and additionally, numbers within strings are recognised and compared numerically, rather than alphabetically.
When used for sorting, the result is that e.g. file names containing numbers are sorted in a natural way.
For example, sorting with a simple string comparison results in:
But sorting the same strings in natural sort order results in:
wxCmpNatural() uses an OS native natural sort function when available (currently only under Microsoft Windows), wxCmpNaturalGeneric() otherwise.
Be aware that OS native implementations might differ from each other, and might change behaviour from release to release.
This is wxWidgets' own implementation of the natural sort comparison function.
Comparison function comparing strings in dictionary order.
The "dictionary order" differs from the alphabetical order in that the strings differing not only in case are compared case-insensitively to ensure that "Aa" comes before "AB" in the sorted array, unlike with wxStringSortAscending().
This function can be used with wxSortedArrayString::Sort() or passed as an argument to wxSortedArrayString constructor.
Comparison function comparing strings in reverse dictionary order.
See wxDictionaryStringSortAscending() for the dictionary sort description.
Comparison function comparing strings in natural order.
This function can be used with wxSortedArrayString::Sort() or passed as an argument to wxSortedArrayString constructor.
See wxCmpNatural() for more information about how natural sort order is implemented.
Comparison function comparing strings in reverse natural order.
This function can be used with wxSortedArrayString::Sort() or passed as an argument to wxSortedArrayString constructor.
See wxCmpNatural() for more information about how natural sort order is implemented.
Comparison function comparing strings in alphabetical order.
This function can be used with wxSortedArrayString::Sort() or passed as an argument to wxSortedArrayString constructor.
Comparison function comparing strings in reverse alphabetical order.
This function can be used with wxSortedArrayString::Sort() or passed as an argument to wxSortedArrayString constructor.