Boost C++ Libraries: Ticket #4206: Usage documentation for string_algo split does not work as advertised https://svn.boost.org/trac10/ticket/4206 <p> Sorry that this is so trivial, but it has been around for years... </p> <p> In doc/html/string_algo/usage.html#id1761650 </p> <blockquote> <p> string str1("hello abc-*-ABC-*-aBc goodbye"); </p> </blockquote> <p> [snip] </p> <blockquote> <p> split( <a class="missing wiki">SplitVec</a>, str1, is_any_of("-*") ); <em> <a class="missing wiki">SplitVec</a> == { "hello abc","ABC","aBc goodbye" } </em></p> </blockquote> <p> No it isn't; the result includes empty strings because of the grouped separators in "-*-". To produce the 3 strings as in the comment needs: </p> <blockquote> <p> split( <a class="missing wiki">SplitVec</a>, str1, is_any_of("-*"), token_compress_on ); </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4206 Trac 1.4.3 Steven Watanabe Wed, 12 May 2010 12:56:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4206#comment:1 https://svn.boost.org/trac10/ticket/4206#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/61931" title="Fix example. Fixes #4206">[61931]</a>) Fix example. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4206" title="#4206: Bugs: Usage documentation for string_algo split does not work as advertised (closed: fixed)">#4206</a> </p> Ticket