]> git.saurik.com Git - wxWidgets.git/blame - include/wx/tokenzr.h
Changed HWND --> WXHWND in tooltip.h so it can be included in files
[wxWidgets.git] / include / wx / tokenzr.h
CommitLineData
f4ada568
GL
1/////////////////////////////////////////////////////////////////////////////
2// Name: tokenzr.h
3// Purpose: String tokenizer
4// Author: Guilhem Lavaux
5// Modified by:
6// Created: 04/22/98
7// RCS-ID: $Id$
8// Copyright: (c) Guilhem Lavaux
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOKENZRH
13#define _WX_TOKENZRH
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/object.h"
20#include "wx/string.h"
c058d771 21#include "wx/filefn.h"
f4ada568 22
85833f5c
VZ
23class WXDLLEXPORT wxStringTokenizer : public wxObject
24{
f4ada568 25public:
85833f5c
VZ
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();
31
e0272d05 32 int CountTokens() const;
85833f5c
VZ
33 bool HasMoreTokens();
34
35 wxString NextToken();
36 wxString GetNextToken() { return NextToken(); };
37
38 wxString GetString() const { return m_string; }
39
40 void SetString(const wxString& to_tokenize,
41 const wxString& delims = " \t\r\n",
42 bool ret_delim = FALSE)
43 {
44 m_string = to_tokenize;
45 m_delims = delims;
46 m_retdelims = ret_delim;
47 }
dbdb39b2 48
f4ada568 49protected:
e0272d05 50 off_t FindDelims(const wxString& str, const wxString& delims) const;
85833f5c
VZ
51 void EatLeadingDelims();
52
53 wxString m_string, m_delims;
54 bool m_retdelims;
f4ada568
GL
55};
56
85833f5c 57#endif // _WX_TOKENZRH