C++ 字符串处理工具包

fmms 13年前
     <p>C++ String Toolkit Library 是 C++ 模板化的字符串切割工具包,类似 Java 的 StringTokenizer 类。</p>    <ul class="features">     <li itemprop="providedFeatures">Generic string tokenizer and token iterators</li>     <li itemprop="providedFeatures">Split routines</li>     <li itemprop="providedFeatures">User specified delimiter and splitter policies (simple and regex based etc.)</li>     <li itemprop="providedFeatures">Conversions between data and hex and base-64</li>     <li itemprop="providedFeatures">In-place removal and replace routines</li>     <li itemprop="providedFeatures">Wild-card matching and globbing</li>     <li itemprop="providedFeatures">Search and Replace</li>     <li itemprop="providedFeatures">Fast token grid and Comma Separated Values (CSV and DSV) processing</li>     <li itemprop="providedFeatures">Extremely fast String to Integer, Double and other POD conversions</li>     <li itemprop="providedFeatures">Extensible string processing templates and algorithms (eg: combinatorics and randomizations)</li>     <li itemprop="providedFeatures">Fast and simple-to-use binary serialization</li>     <li itemprop="providedFeatures">Seamless integration with STL and Boost</li>     <li itemprop="providedFeatures">Easy to use wrappers of common string processing usage patterns</li>     <li itemprop="providedFeatures">Single header file solution requires no installation or building</li>    </ul>    <p><img alt="C++ 字符串处理工具包" src="https://simg.open-open.com/show/b95e63da092454a6166c6db4295ba5f5.png" width="629" height="293" /></p>    <p>示例代码:</p>    <pre class="brush:cpp; toolbar: true; auto-links: false;">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);</pre>    <p></p>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1326940748671" target="_blank">http://www.open-open.com/lib/view/home/1326940748671</a></p>