moonpool/dev/ocaml/Stdlib/Char/index.html
2023-08-29 18:39:53 +00:00

2 lines
No EOL
4.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Char (ocaml.Stdlib.Char)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../index.html">ocaml</a> &#x00BB; <a href="../index.html">Stdlib</a> &#x00BB; Char</nav><header class="odoc-preamble"><h1>Module <code><span>Stdlib.Char</span></code></h1><p>Character operations.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value external anchored" id="val-code"><a href="#val-code" class="anchor"></a><code><span><span class="keyword">val</span> code : <span>char <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>Return the ASCII code of the argument.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chr"><a href="#val-chr" class="anchor"></a><code><span><span class="keyword">val</span> chr : <span>int <span class="arrow">&#45;&gt;</span></span> char</span></code></div><div class="spec-doc"><p>Return the character with the given ASCII code.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Invalid_argument</span> <p>if the argument is outside the range 0--255.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-escaped"><a href="#val-escaped" class="anchor"></a><code><span><span class="keyword">val</span> escaped : <span>char <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p>Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-lowercase_ascii"><a href="#val-lowercase_ascii" class="anchor"></a><code><span><span class="keyword">val</span> lowercase_ascii : <span>char <span class="arrow">&#45;&gt;</span></span> char</span></code></div><div class="spec-doc"><p>Convert the given character to its equivalent lowercase character, using the US-ASCII character set.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 4.03.0</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-uppercase_ascii"><a href="#val-uppercase_ascii" class="anchor"></a><code><span><span class="keyword">val</span> uppercase_ascii : <span>char <span class="arrow">&#45;&gt;</span></span> char</span></code></div><div class="spec-doc"><p>Convert the given character to its equivalent uppercase character, using the US-ASCII character set.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 4.03.0</li></ul></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = char</span></code></div><div class="spec-doc"><p>An alias for the type of characters.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span><span class="keyword">val</span> compare : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>The comparison function for characters, with the same specification as <a href="../index.html#val-compare"><code>Stdlib.compare</code></a>. Along with the type <code>t</code>, this function <code>compare</code> allows the module <code>Char</code> to be passed as argument to the functors <a href="../Set/Make/index.html"><code>Set.Make</code></a> and <a href="../Map/Make/index.html"><code>Map.Make</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span><span class="keyword">val</span> equal : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>The equal function for chars.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 4.03.0</li></ul></div></div></div></body></html>