C++ 字符串处理工具包


C++ String Toolkit Library 是 C++ 模板化的字符串切割工具包,类似 Java 的 StringTokenizer 类。

  • Generic string tokenizer and token iterators
  • Split routines
  • User specified delimiter and splitter policies (simple and regex based etc.)
  • Conversions between data and hex and base-64
  • In-place removal and replace routines
  • Wild-card matching and globbing
  • Search and Replace
  • Fast token grid and Comma Separated Values (CSV and DSV) processing
  • Extremely fast String to Integer, Double and other POD conversions
  • Extensible string processing templates and algorithms (eg: combinatorics and randomizations)
  • Fast and simple-to-use binary serialization
  • Seamless integration with STL and Boost
  • Easy to use wrappers of common string processing usage patterns
  • Single header file solution requires no installation or building

C++ 字符串处理工具包


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);


昵    称: