X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4ada568223b79c8a5769cc351c36a8e2ccd7841..7491d644e6103afc2a69b750ca255218181b63a3:/include/wx/tokenzr.h?ds=sidebyside diff --git a/include/wx/tokenzr.h b/include/wx/tokenzr.h index 7942996e29..764b4c8091 100644 --- a/include/wx/tokenzr.h +++ b/include/wx/tokenzr.h @@ -18,18 +18,33 @@ #include "wx/object.h" #include "wx/string.h" +#include "wx/filefn.h" -class wxStringTokenizer : wxObject { +class wxStringTokenizer : public wxObject { public: wxStringTokenizer(const wxString& to_tokenize, const wxString& delims = " \t\r\n", bool ret_delim = FALSE); + wxStringTokenizer() { m_string = ""; m_delims = ""; m_retdelims = FALSE;} ~wxStringTokenizer(); int CountTokens(); bool HasMoreToken(); + inline bool HasMoreTokens() { return HasMoreToken(); }; wxString NextToken(); + // A better name! + inline wxString GetNextToken() { return NextToken(); }; wxString GetString() { return m_string; } + + void SetString(const wxString& to_tokenize, + const wxString& delims = " \t\r\n", + bool ret_delim = FALSE) + { + m_string = to_tokenize; + m_delims = delims; + m_retdelims = ret_delim; + } + protected: off_t FindDelims(const wxString& str, const wxString& delims); protected: