title: C++ Boost: Split function is_any_of()
body: <p>I'm trying to use the <code>split()</code> function provided in  <code>boost/algorithm/string.hpp</code> in the following function :</p>
  
  <pre><code>vector&lt;std::string&gt; splitString(string input, string pivot) { //Pivot: e.g., "##"
      vector&lt;string&gt; splitInput;  //Vector where the string is split and stored
      split(splitInput,input,is_any_of(pivot),token_compress_on);       //Split the string
      return splitInput;
  }
  </code></pre>
  
  <p>The following call :</p>
  
  <pre><code>string hello = "Hieafds##addgaeg##adf#h";
  vector&lt;string&gt; split = splitString(hello,"##"); //Split the string based on occurrences of "##"
  </code></pre>
  
  <p>splits the string into <code>"Hieafds" "addgaeg" "adf"</code> &amp; <code>"h"</code>. However I don't want the string to be split by a single <code>#</code>. I <em>think</em> that the problem is with <code>is_any_of()</code>.</p>
  
  <p>How should the function be modified so that the string is split only by occurrences of <code>"##"</code> ?</p>