Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

StringTokenizer.h

Go to the documentation of this file.
00001 /*
00002  ***********************************************************************
00003  * Class: StringTokenizer                                              *
00004  * By Arash Partow - 2000                                              *
00005  * URL: http://www.partow.net/programming/stringtokenizer/index.html   *
00006  *                                                                     *
00007  * Copyright Notice:                                                   *
00008  * Free use of this library is permitted under the guidelines and      *
00009  * in accordance with the most current version of the Common Public    *
00010  * License.                                                            *
00011  * http://www.opensource.org/licenses/cpl.php                          *
00012  *                                                                     *
00013  ***********************************************************************
00014 */
00015 
00016 
00017 
00018 #ifndef INCLUDE_STRINGTOKENIZER_H
00019 #define INCLUDE_STRINGTOKENIZER_H
00020 
00021 
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <iostream>
00025 #include <string>
00026 
00027 
00028 class StringTokenizer
00029 {
00030 
00031    public:
00032 
00033     StringTokenizer(const std::string& _str, const std::string& _delim);
00034    ~StringTokenizer(){};
00035 
00036     int         countTokens();
00037     bool        hasMoreTokens();
00038     std::string nextToken();
00039     int         nextIntToken();
00040     double      nextFloatToken();
00041     std::string nextToken(const std::string& delim);
00042     std::string remainingString();
00043     std::string filterNextToken(const std::string& filterStr);
00044 
00045    private:
00046 
00047     std::string  token_str;
00048     std::string  delim;
00049 
00050 };
00051 
00052 #endif

Note: Generated nightly - reload for latest version
Generated on Thu Dec 22 23:12:37 2005 for terreneuve by doxygen 1.3.6