1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: String tokenizer
4 // Author: Guilhem Lavaux
8 // Copyright: (c) Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/filefn.h"
23 class WXDLLEXPORT wxStringTokenizer
: public wxObject
26 wxStringTokenizer(const wxString
& to_tokenize
,
27 const wxString
& delims
= " \t\r\n",
28 bool ret_delim
= FALSE
);
29 wxStringTokenizer() { m_retdelims
= FALSE
;}
30 virtual ~wxStringTokenizer();
32 int CountTokens() count
;
36 wxString
GetNextToken() { return NextToken(); };
38 wxString
GetString() const { return m_string
; }
40 void SetString(const wxString
& to_tokenize
,
41 const wxString
& delims
= " \t\r\n",
42 bool ret_delim
= FALSE
)
44 m_string
= to_tokenize
;
46 m_retdelims
= ret_delim
;
50 off_t
FindDelims(const wxString
& str
, const wxString
& delims
);
51 void EatLeadingDelims();
53 wxString m_string
, m_delims
;
57 #endif // _WX_TOKENZRH