added wxJoin and wxSplit functions (modified patch 1638950)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-18 14:43:41 +00:00
parent 2d2dd913b7
commit abbb59e8eb
5 changed files with 330 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ public:
wxArrayStringBase::Add(string, copies);
return size() - copies;
}
};
}
class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
{
@@ -343,4 +343,21 @@ private:
wxString* m_strings;
};
#endif
// ----------------------------------------------------------------------------
// helper functions for working with arrays
// ----------------------------------------------------------------------------
// by default, these functions use the escape character to escape the
// separators occuring inside the string to be joined, this can be disabled by
// passing '\0' as escape
WXDLLIMPEXP_BASE wxString wxJoin(const wxArrayString& arr,
const wxChar sep,
const wxChar escape = wxT('\\'));
WXDLLIMPEXP_BASE wxArrayString wxSplit(const wxString& str,
const wxChar sep,
const wxChar escape = wxT('\\'));
#endif // _WX_ARRSTR_H