X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c968cee840eda3b7340cdb4ba822065721cbdf6..ea1b0d6ccb7d492f93a4f48f600ae0b6b397cbd7:/include/wx/tokenzr.h diff --git a/include/wx/tokenzr.h b/include/wx/tokenzr.h index 9a08ddb460..e9e11c30df 100644 --- a/include/wx/tokenzr.h +++ b/include/wx/tokenzr.h @@ -2,7 +2,7 @@ // Name: wx/tokenzr.h // Purpose: String tokenizer - a C++ replacement for strtok(3) // Author: Guilhem Lavaux -// Modified by: Vadim Zeitlin +// Modified by: (or rather rewritten by) Vadim Zeitlin // Created: 04/22/98 // RCS-ID: $Id$ // Copyright: (c) Guilhem Lavaux @@ -92,7 +92,7 @@ public: // compatibility only, don't use void SetString(const wxString& to_tokenize, const wxString& delims, - bool ret_delim) + bool WXUNUSED(ret_delim)) { SetString(to_tokenize, delims, wxTOKEN_RET_DELIMS); } @@ -117,4 +117,15 @@ protected: bool m_hasMore; // do we have more (possible empty) tokens? }; +// ---------------------------------------------------------------------------- +// convenience function which returns all tokens at once +// ---------------------------------------------------------------------------- + +// the function takes the same parameters as wxStringTokenizer ctor and returns +// the array containing all tokens +wxArrayString WXDLLEXPORT +wxStringTokenize(const wxString& str, + const wxString& delims = wxDEFAULT_DELIMITERS, + wxStringTokenizerMode mode = wxTOKEN_DEFAULT); + #endif // _WX_TOKENZRH