Advanced Strategic Command
stringtokenizer.h
Go to the documentation of this file.
1 /***************************************************************************
2  stringtokenizer.h - description
3  -------------------
4  begin : Sun Jan 28 2001
5  copyright : (C) 2001 by Martin Bickel
6  email : bickel@asc-hq.org
7  ***************************************************************************/
8 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 
23 #ifndef stringtokenizerH
24  #define stringtokenizerH
25 
26  #include "ascstring.h"
27 
30  const ASCString& str;
31  int i;
32  bool includeOperators;
33  ASCString delimitter;
34  private:
35  int CharSpace ( char c );
36  public:
37  StringTokenizer ( const ASCString& _str, bool includeOperators_ = false );
38  StringTokenizer ( const ASCString& _str, const ASCString& delimitter_ );
39  StringTokenizer ( const ASCString& _str, const char* delimitter_ );
42  void skipTill(char endchar );
43  };
44 
45  class StringSplit {
46  const ASCString& str;
47  int i;
48  ASCString delimitter;
49  bool isDelimitter ( char c );
50  public:
51  StringSplit ( const ASCString& _str, const ASCString& delimitter_ );
53  };
54 
55 
56 #endif
StringTokenizer(const ASCString &_str, bool includeOperators_=false)
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
StringSplit(const ASCString &_str, const ASCString &delimitter_)
ASCString getNextToken()
This String Tokenizer is NOT intended to be a general purpose tool. It is exclusively used by the Tex...
ASCString getNextToken()
ASCString getRemaining()
void skipTill(char endchar)