// StringTokenizer.H -*- C++ -*-
// Copyright (c) 1997, 1998 Etienne BERNARD
+// Copyright (c) 2005 Clinton Ebadi
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef STRINGTOKENIZER_H
#define STRINGTOKENIZER_H
-#include "String.H"
+#include <string>
-class StringTokenizer {
- String st;
- int pos;
+class StringTokenizer
+{
+ std::string st;
+ std::string::size_type pos;
public:
- StringTokenizer(String);
+ StringTokenizer(std::string);
StringTokenizer(StringTokenizer &);
- bool hasMoreTokens();
- bool hasMoreTokens(char);
+ bool more_tokens_p ();
+ bool more_tokens_p (char);
- int countTokens();
- int countTokens(char);
+ unsigned int count_tokens();
+ unsigned int count_tokens(char);
- String nextToken();
- String nextToken(char, bool = false);
+ std::string next_token();
+ std::string next_token(char, bool = false);
- String rest();
+ std::string rest();
};
#endif