C++ String Toolkit Library
C++ String Toolkit Library 是 C++ 模板化的字符串切割工具包,类似 Java 的 StringTokenizer 类。
示例代码:
strtk::multiple_delimiter_predicate(Iterator begin, Iterator end); std::string str_delimiters = " ,.;:<>'[]{}()_?/'`~!@#$%^&*|-_\"=+"; strtk::multiple_delimiter_predicate mdp1(str_delimiters.begin(),str_delimiters.end()); unsigned int uint_delimiters[5] = {1,10,101,1010,10101}; strtk::multiple_delimiter_predicate mdp2(uint_delimiters,uint_delimiters + 5);
评论