Copy constructor. Note that when an array is assigned to a sorted array, its contents is
automatically sorted during construction.
-\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wxChar**}{ arr}}
+\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const char**}{ arr}}
+
+\func{}{wxArrayString}{\param{size\_t}{ sz}, \param{const wchar\_t**}{ arr}}
Constructor from a C string array. Pass a size {\it sz} and array {\it arr}.
\membersection{wxArrayString::Index}\label{wxarraystringindex}
-\func{int}{Index}{\param{const wxChar *}{ sz}, \param{bool}{ bCase = true}, \param{bool}{ bFromEnd = false}}
+\func{int}{Index}{\param{const wxString\& }{ sz}, \param{bool}{ bCase = true}, \param{bool}{ bFromEnd = false}}
Search the element in the array, starting from the beginning if
{\it bFromEnd} is false or from end otherwise. If {\it bCase}, comparison is
\membersection{wxArrayString::Remove}\label{wxarraystringremove}
-\func{void}{Remove}{\param{const wxChar *}{ sz}}
+\func{void}{Remove}{\param{const wxString\&}{ sz}}
Removes the first item matching this value. An assert failure is provoked by
an attempt to remove an element which does not exist in debug build.
// supported it...
wxArrayString(int autoSort) { Init(autoSort != 0); }
// C string array ctor
- wxArrayString(size_t sz, const wxChar** a);
+ wxArrayString(size_t sz, const char** a);
+ wxArrayString(size_t sz, const wchar_t** a);
// wxString string array ctor
wxArrayString(size_t sz, const wxString* a);
// copy ctor
// expand the array to have count elements
void SetCount(size_t count);
// remove first item matching this value
- void Remove(const wxChar *sz);
+ void Remove(const wxString& sz);
// remove item by index
void RemoveAt(size_t nIndex, size_t nRemove = 1);
// ArrayString
// ============================================================================
-wxArrayString::wxArrayString(size_t sz, const wxChar** a)
+wxArrayString::wxArrayString(size_t sz, const char** a)
+{
+#if !wxUSE_STL
+ Init(false);
+#endif
+ for (size_t i=0; i < sz; i++)
+ Add(a[i]);
+}
+
+wxArrayString::wxArrayString(size_t sz, const wchar_t** a)
{
#if !wxUSE_STL
Init(false);
}
// removes item from array (by value)
-void wxArrayString::Remove(const wxChar *sz)
+void wxArrayString::Remove(const wxString& sz)
{
int iIndex = Index(sz);