title: Searching for an alternative for strtok() in C++
body: <p>I am using strtok to divide a string in several parts.
  In this example, all sections will be read from the string, which are bounded by a colon or a semicolon</p>
  
  <pre><code>char string[] = "Alice1:IscoolAlice2; Alert555678;Bob1:knowsBeepBob2;sees";
  char delimiter[] = ":;";
  char *p;
  
  p = strtok(string, delimiter);
  
  while(p != NULL) {
      cout &lt;&lt; "Result: " &lt;&lt; p &lt;&lt; endl;
  
      p = strtok(NULL, delimiter);
  }
  </code></pre>
  
  <p>As results I get:</p>
  
  <pre><code>Result: Alice1
  Result: IscoolAlice2
  Result:  Alert555678
  Result: Bob1
  Result: knowsBeepBob2
  Result: sees
  </code></pre>
  
  <p>But I would like to get this results:</p>
  
  <pre><code>Result: Alice1:
  Result: Alice2;
  Result: Bob1:
  Result: Bob2;
  </code></pre>
  
  <p>The restriction is that I can only choose individual characters when I use strtok.
  Does anyone know an alternative for strtok that I also can search for strings?
  Or has anyone an idea to solve my problem?</p>