Update ohex doc to 0.2.0.

This commit is contained in:
Hannes Mehnert 2024-03-18 11:53:39 +01:00
parent a05c98694a
commit edf7b50418
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="ohex/index.html">ohex</a> <span class="version">0.1.0</span></li>
<li><a href="ohex/index.html">ohex</a> <span class="version">0.2.0</span></li>
</ol>
</div>
</main>

View file

@ -5,10 +5,10 @@
<span>bytes <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?off</span>:int <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>decode_into ~skip_whitespace s dst ~off ()</code> decodes <code>s</code> into <code>dst</code> starting at <code>off</code> (defaults to 0). The argument <code>skip_whitespace</code> defaults to <code>true</code> and skips any whitespace characters.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if any character in <code>s</code> is not a hex character, an odd amount of characters are present, or <code>dst</code> does not contain enough space.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-encode"><a href="#val-encode" class="anchor"></a><code><span><span class="keyword">val</span> encode : <span>string <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p><code>encode s</code> encodes <code>s</code> into a freshly allocated string of double size, where each character in <code>s</code> is encoded as two hex digits in the returned string. An example: <code>encode &quot;AB&quot; = &quot;4142&quot;</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-encode_into"><a href="#val-encode_into" class="anchor"></a><code><span><span class="keyword">val</span> encode_into : <span>string <span class="arrow">&#45;&gt;</span></span> <span>bytes <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?off</span>:int <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>encode_into s dst ~off ()</code> encodes <code>s</code> into <code>dst</code> starting at <code>off</code> (defaults to 0). Each character is encoded as two hex digits in <code>dst</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if <code>dst</code> does not contain enough space.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp :
unit</span></code></div><div class="spec-doc"><p><code>decode_into ~skip_whitespace s dst ~off ()</code> decodes <code>s</code> into <code>dst</code> starting at <code>off</code> (defaults to 0). The argument <code>skip_whitespace</code> defaults to <code>true</code> and skips any whitespace characters.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if any character in <code>s</code> is not a hex character, an odd amount of characters are present, or <code>dst</code> does not contain enough space.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-encode"><a href="#val-encode" class="anchor"></a><code><span><span class="keyword">val</span> encode : <span>string <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p><code>encode s</code> encodes <code>s</code> into a freshly allocated string of double size, where each character in <code>s</code> is encoded as two hex digits in the returned string. An example: <code>encode &quot;AB&quot; = &quot;4142&quot;</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-encode_into"><a href="#val-encode_into" class="anchor"></a><code><span><span class="keyword">val</span> encode_into : <span>string <span class="arrow">&#45;&gt;</span></span> <span>bytes <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?off</span>:int <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>encode_into s dst ~off ()</code> encodes <code>s</code> into <code>dst</code> starting at <code>off</code> (defaults to 0). Each character is encoded as two hex digits in <code>dst</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if <code>dst</code> does not contain enough space.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>pp ppf s</code> pretty-prints the string <code>s</code> in hexadecimal. Some spaces are emitted for easier readability. No newline is emitted.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_hexdump"><a href="#val-pp_hexdump" class="anchor"></a><code><span><span class="keyword">val</span> pp_hexdump :
<span><span class="optlabel">?row_numbers</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?chars</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>pp ~row_numbers ~chars () ppf s</code> pretty-prints the string <code>s</code> in hexadecimal (similar to <code>hexdump -C</code>). If <code>row_numbers</code> is provided (defaults to <code>true</code>), each output line is prefixed with the row number. If <code>chars</code> is provided (defaults to <code>true</code>), in the last column the ASCII string is printed (non-printable characters are printed as '.').</p></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p><code>pp_hexdump ~row_numbers ~chars () ppf s</code> pretty-prints the string <code>s</code> in hexadecimal (similar to <code>hexdump -C</code>). If <code>row_numbers</code> is provided (defaults to <code>true</code>), each output line is prefixed with the row number. If <code>chars</code> is provided (defaults to <code>true</code>), in the last column the ASCII string is printed (non-printable characters are printed as '.').</p></div></div></div></body></html>