Version: 3.0.5
Loading...
Searching...
No Matches
arrstr.h File Reference

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 string in alphabetical order. More...
 

Functions

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.
 
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.
 

Function Documentation

◆ wxJoin()

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.

If the escape character is non-NULL, then it's used as prefix for each occurrence of sep in the strings contained in arr before joining them which is necessary in order to be able to recover the original array contents from the string later using wxSplit().

See also
wxSplit()

Include file:

#include <wx/arrstr.h> 

◆ wxSplit()

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.

If the escape character is non-NULL, then the occurrences of sep immediately prefixed with escape are not considered as separators. Note that empty tokens will be generated if there are two or more adjacent separators.

See also
wxJoin()

Include file:

#include <wx/arrstr.h>