#include "wx/defs.h"
#include "wx/string.h"
-WXDLLIMPEXP_BASE int wxStringSortAscending(wxString*, wxString*);
-WXDLLIMPEXP_BASE int wxStringSortDescending(wxString*, wxString*);
+WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
+WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
#if wxUSE_STL
#include "wx/dynarray.h"
-typedef int (*CMPFUNCwxString)(wxString*, wxString*);
+typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*);
typedef wxString _wxArraywxBaseArrayStringBase;
_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
wxArray_SortFunction<wxString>,
public:
wxArrayString() { }
wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
+
+ int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
};
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
for ( size_t n = 0; n < src.size(); n++ )
Add(src[n]);
}
+
+ int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
};
#else // if !wxUSE_STL
{
public:
// type of function used by wxArrayString::Sort()
- typedef int (*CompareFunction)(const wxString& first,
+ typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
const wxString& second);
// type of function used by wxArrayString::Sort(), for compatibility with
// wxArray
- typedef int (*CompareFunction2)(wxString* first,
+ typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first,
wxString* second);
// constructors and destructor
return Item(Count() - 1);
}
-#if WXWIN_COMPATIBILITY_2_4
// return a wxString[], useful for the controls which
// take one in their ctor. You must delete[] it yourself
// once you are done with it. Will return NULL if the
// ArrayString was empty.
wxString* GetStringArray() const;
-#endif
// item management
// Search the element in the array, starting from the beginning if