e>while_</code> does not consume input.</li></ul><p>Examples</p><pre><code>module P = Reparse.String
open P

;;
let buf = Buffer.create 0 in
let on_take_cb a = Buffer.add_char buf a in
let p =
  P.(take_while_cb (char 'a') ~while_:(is_not (char 'b')) ~on_take_cb)
in
let v = P.parse_string p &quot;aaab&quot; in
let s = Buffer.contents buf in
v = 3 &amp;&amp; s = &quot;aaa&quot;</code></pre></div></div><div class="odoc-spec"><div class="spec value" id="val-take_while" class="anchored"><a href="#val-take_while