(wxArrayString uses its knowledge of internals of wxString class to achieve this).
This class is used in the same way as other dynamic arrays(), except that no
(wxArrayString uses its knowledge of internals of wxString class to achieve this).
This class is used in the same way as other dynamic arrays(), except that no
When a string is added or inserted in the array, a copy of the string is created,
so the original string may be safely deleted (e.g. if it was a @e wxChar *
pointer the memory it was using can be freed immediately after this).
When a string is added or inserted in the array, a copy of the string is created,
so the original string may be safely deleted (e.g. if it was a @e wxChar *
pointer the memory it was using can be freed immediately after this).
**/
wxArrayString(size_t sz, const char** arr);
wxArrayString(size_t sz, const wchar_t** arr);
//@}
/**
**/
wxArrayString(size_t sz, const char** arr);
wxArrayString(size_t sz, const wchar_t** arr);
//@}
/**
should be used when the array is going to be reused for storing other strings.
Otherwise, you should use Clear() to empty the array and free memory.
*/
should be used when the array is going to be reused for storing other strings.
Otherwise, you should use Clear() to empty the array and free memory.
*/
(default), otherwise the case is ignored.
This function uses linear search for wxArrayString.
Returns index of the first item matched or @c wxNOT_FOUND if there is no match.
*/
(default), otherwise the case is ignored.
This function uses linear search for wxArrayString.
Returns index of the first item matched or @c wxNOT_FOUND if there is no match.
*/
- int Index(const wxString& sz, bool bCase = true,
- bool bFromEnd = false);
+ int Index(const wxString& sz, bool bCase = true, bool bFromEnd = false) const;
*/
void Insert(const wxString& str, size_t nIndex,
size_t copies = 1);
/**
Returns @true if the array is empty, @false otherwise. This function returns the
*/
void Insert(const wxString& str, size_t nIndex,
size_t copies = 1);
/**
Returns @true if the array is empty, @false otherwise. This function returns the
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
@see operator[] for the operator version.
*/
result from an attempt to access an element beyond the end of array in debug
mode, but no check is done in release mode.
@see operator[] for the operator version.
*/
/**
Returns the last element of the array. Attempt to access the last element of
an empty array will result in assert failure in debug build, however no checks
are done in release mode.
*/
/**
Returns the last element of the array. Attempt to access the last element of
an empty array will result in assert failure in debug build, however no checks
are done in release mode.
*/
- @e CompareFunction is defined as a function taking two @e const wxString
- parameters and returning an @e int value less than, equal to or greater
+ @a CompareFunction is defined as a function taking two @e const wxString
+ parameters and returning an @e int value less than, equal to or greater
result from an attempt to access an element beyond the end of array in
debug mode, but no check is done in release mode.
This is the operator version of the Item() method.
*/
result from an attempt to access an element beyond the end of array in
debug mode, but no check is done in release mode.
This is the operator version of the Item() method.
*/
the @a bCase and @a bFromEnd parameters.
*/
int Index(const wxString& sz, bool bCase = true,
the @a bCase and @a bFromEnd parameters.
*/
int Index(const wxString& sz, bool bCase = true,
/**
@warning this function should not be used with sorted array because it could
break the order of items and, for example, subsequent calls to Index()
/**
@warning this function should not be used with sorted array because it could
break the order of items and, for example, subsequent calls to Index()
*/
wxArrayString wxSplit(const wxString& str, const wxChar sep,
const wxChar escape = '\\');
*/
wxArrayString wxSplit(const wxString& str, const wxChar sep,
const wxChar escape = '\\');
@a sep and returns the result as a wxString.
If the @a escape character is non-@NULL, then it's used as prefix for each
@a sep and returns the result as a wxString.
If the @a escape character is non-@NULL, then it's used as prefix for each
- occurrence of @e sep in the strings contained in @a arr before joining them
- which is necessary in order to be able to recover the original array contents
- from the string later using wxSplit().
+ occurrence of @a sep in the strings contained in @a arr before joining them
+ which is necessary in order to be able to recover the original array
+ contents from the string later using wxSplit().
*/
wxString wxJoin(const wxArrayString& arr, const wxChar sep,
const wxChar escape = '\\');
//@}
*/
wxString wxJoin(const wxArrayString& arr, const wxChar sep,
const wxChar escape = '\\');
//@}