function
    | 'a' -&gt; true
    | _ -&gt; false)
in
let v = P.parse_string p &quot;abc&quot; in
v = 'a'</code></pre></div></div><div class="odoc-spec"><div class="spec value" id="val-string" class="anchored"><a href="#val-string" class="anchor"></a><code><span><span class="keyword">val</span> string : <span>?case_sensitive:bool <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <span>string <a href="#type-t">t</a></span></span></code></div><div class="spec