📄 stringtokenizer.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 + -