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