ss="spec-doc"><p><code>peek_char t</code> parses the next character from input without consuming it. It fails if <code>EOI</code> is reached.</p><p>Examples</p><pre><code>module P = Reparse.String

;;
let p = P.peek_char in
let v = P.parse_string p &quot;hello&quot; in
v = 'h'</code></pre><p>Input is not consumed.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-peek_char_opt" class="anchored"><a href="#val-peek_char_opt" class="anchor"></a><code><span><span class="keyword">val</span> p