⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringtokenizer.h

📁 该源码是一个比较经典的字符串处理函数
💻 H
字号:
/* *********************************************************************** * Class: StringTokenizer                                              * * By Arash Partow - 2000                                              * * URL: http://www.partow.net/programming/stringtokenizer/index.html   * *                                                                     * * Copyright Notice:                                                   * * Free use of this library is permitted under the guidelines and      * * in accordance with the most current version of the Common Public    * * License.                                                            * * http://www.opensource.org/licenses/cpl.php                          * *                                                                     * ************************************************************************/#ifndef INCLUDE_STRINGTOKENIZER_H#define INCLUDE_STRINGTOKENIZER_H#include <stdio.h>#include <stdlib.h>#include <iostream>#include <string>class StringTokenizer{   public:    StringTokenizer(const std::string& _str, const std::string& _delim);   ~StringTokenizer(){};    int         countTokens();    bool        hasMoreTokens();    std::string nextToken();    int         nextIntToken();    double      nextFloatToken();    std::string nextToken(const std::string& delim);    std::string remainingString();    std::string filterNextToken(const std::string& filterStr);   private:    std::string  token_str;    std::string  delim;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -