]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/tokenzr.h
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 wxStringTokenizer
: public wxObject
{
25 wxStringTokenizer(const wxString
& to_tokenize
,
26 const wxString
& delims
= " \t\r\n",
27 bool ret_delim
= FALSE
);
28 wxStringTokenizer() { m_string
= ""; m_delims
= ""; m_retdelims
= FALSE
;}
33 inline bool HasMoreTokens() { return HasMoreToken(); };
36 inline wxString
GetNextToken() { return NextToken(); };
37 wxString
GetString() { return m_string
; }
39 void SetString(const wxString
& to_tokenize
,
40 const wxString
& delims
= " \t\r\n",
41 bool ret_delim
= FALSE
)
43 m_string
= to_tokenize
;
45 m_retdelims
= ret_delim
;
49 off_t
FindDelims(const wxString
& str
, const wxString
& delims
);
50 void EatLeadingDelims(); // AVS - added to fix leading whitespace /
53 wxString m_string
, m_delims
;