wxStringList: wxList

A string list is a list which is assumed to contain strings, with a specific member functions. Memory is allocated when strings are added to the list, and deallocated by the destructor or by the Delete member.

wxStringList::wxStringList

voidwxStringList

Constructor.

voidwxStringListchar *first, ...

Constructor, taking NULL-terminated string argument list. wxStringList allocates memory for the strings.

wxStringList::wxStringList

voidwxStringList

Deletes string list, deallocating strings.

wxStringList::Add

voidAddchar *s

Adds string to list, allocating memory.

wxStringList::Delete

voidDeletechar *s

Searches for string and deletes from list, deallocating memory.

wxStringList::ListToArray

char **ListToArrayBool new_copies = FALSE

Converts the list to an array of strings, only allocating new memory if new_copies is TRUE.

wxStringList::Member

BoolMemberchar *s

Returns TRUE if s is a member of the list (tested using strcmp).

wxStringList::Sort

voidSort

Sorts the strings in ascending alphabetical order. Note that all nodes (but not strings) get deallocated and new ones allocated.