<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="CamomileLibrary.OOChannel.html"> <link rel="next" href="CamomileLibrary.USet.html"> <link rel="Up" href="CamomileLibrary.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of class methods" rel=Appendix href="index_methods.html"> <link title="Index of classes" rel=Appendix href="index_classes.html"> <link title="Index of class types" rel=Appendix href="index_class_types.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Index of module types" rel=Appendix href="index_module_types.html"> <link title="CamomileLibrary" rel="Chapter" href="CamomileLibrary.html"> <link title="CamomileLibraryDefault" rel="Chapter" href="CamomileLibraryDefault.html"> <link title="CamomileLibraryDyn" rel="Chapter" href="CamomileLibraryDyn.html"><title>CamomileLibrary.UChar</title> </head> <body> <div class="navbar"><a class="pre" href="CamomileLibrary.OOChannel.html" title="CamomileLibrary.OOChannel">Previous</a> <a class="up" href="CamomileLibrary.html" title="CamomileLibrary">Up</a> <a class="post" href="CamomileLibrary.USet.html" title="CamomileLibrary.USet">Next</a> </div> <h1>Module <a href="type_CamomileLibrary.UChar.html">CamomileLibrary.UChar</a></h1> <pre><span class="keyword">module</span> UChar: <code class="code">sig</code> <a href="CamomileLibrary.UChar.html">..</a> <code class="code">end</code></pre><hr width="100%"> <br> Unicode (ISO-UCS) characters. <p> This module implements Unicode (actually ISO-UCS) characters. All 31-bit code points are allowed.<br> <pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre> <div class="info "> Unicode characters. All 31bit code points are allowed.<br> </div> <pre><span id="EXCEPTIONOut_of_range"><span class="keyword">exception</span> Out_of_range</span></pre> <pre><span id="VALchar_of"><span class="keyword">val</span> char_of</span> : <code class="type"><a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> char</code></pre><div class="info "> <code class="code">char_of u</code> returns the Latin-1 representation of <code class="code">u</code>. If <code class="code">u</code> can not be represented by Latin-1, raises Out_of_range<br> </div> <pre><span id="VALof_char"><span class="keyword">val</span> of_char</span> : <code class="type">char -> <a href="CamomileLibrary.UChar.html#TYPEt">t</a></code></pre><div class="info "> <code class="code">of_char c</code> returns the Unicode character of the Latin-1 character <code class="code">c</code><br> </div> <pre><span id="VALcode"><span class="keyword">val</span> code</span> : <code class="type"><a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> int</code></pre><div class="info "> <code class="code">code u</code> returns the Unicode code number of <code class="code">u</code>. If the value can not be represented by a positive integer, raise Out_of_range<br> </div> <pre><span id="VALchr"><span class="keyword">val</span> chr</span> : <code class="type">int -> <a href="CamomileLibrary.UChar.html#TYPEt">t</a></code></pre><div class="info "> <code class="code">code n</code> returns the Unicode character with the code number <code class="code">n</code>. If n >= 2^32 or n < 0, raises <code class="code">invalid_arg</code><br> </div> <pre><span id="VALuint_code"><span class="keyword">val</span> uint_code</span> : <code class="type"><a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> int</code></pre><div class="info "> <code class="code">uint_code u</code> returns the Unicode code number of <code class="code">u</code>. The returned int is unsigned, that is, on 32-bits platforms, the sign bit is used for storing the 31-th bit of the code number.<br> </div> <pre><span id="VALchr_of_uint"><span class="keyword">val</span> chr_of_uint</span> : <code class="type">int -> <a href="CamomileLibrary.UChar.html#TYPEt">t</a></code></pre><div class="info "> <code class="code">chr_of_uint n</code> returns the Unicode character of the code number <code class="code">n</code>. <code class="code">n</code> is interpreted as unsigned, that is, on 32-bits platforms, the sign bit is treated as the 31-th bit of the code number. If n exceed 31-bits values, then raise <code class="code">invalid_arg</code>.<br> </div> <pre><span id="VALeq"><span class="keyword">val</span> eq</span> : <code class="type"><a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> <a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> bool</code></pre><div class="info "> Equality by code point comparison<br> </div> <pre><span id="VALcompare"><span class="keyword">val</span> compare</span> : <code class="type"><a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> <a href="CamomileLibrary.UChar.html#TYPEt">t</a> -> int</code></pre><div class="info "> <code class="code">compare u1 u2</code> returns, a value > 0 if <code class="code">u1</code> has a larger Unicode code number than <code class="code">u2</code>, 0 if <code class="code">u1</code> and <code class="code">u2</code> are the same Unicode character, a value < 0 if <code class="code">u1</code> has a smaller Unicode code number than <code class="code">u2</code>.<br> </div> <pre><span id="TYPEuchar"><span class="keyword">type</span> <code class="type"></code>uchar</span> = <code class="type"><a href="CamomileLibrary.UChar.html#TYPEt">t</a></code> </pre> <div class="info "> Aliases of <code class="code">type t</code><br> </div> <pre><span id="VALint_of"><span class="keyword">val</span> int_of</span> : <code class="type"><a href="CamomileLibrary.UChar.html#TYPEuchar">uchar</a> -> int</code></pre><div class="info "> Alias of <code class="code">uint_code</code><br> </div> <pre><span id="VALof_int"><span class="keyword">val</span> of_int</span> : <code class="type">int -> <a href="CamomileLibrary.UChar.html#TYPEuchar">uchar</a></code></pre><div class="info "> Alias of <code class="code">chr_of_uint</code><br> </div> </body></html>