Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 5f7775d66d5394cb95afb60b1b12881e > files > 108

ocaml-camomile-devel-0.8.5-3.mga5.i586.rpm

<!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.Type.UTF8.html">
<link rel="next" href="CamomileLibrary.Type.UCS4.html">
<link rel="Up" href="CamomileLibrary.Type.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.Type.UTF16</title>
</head>
<body>
<div class="navbar"><a class="pre" href="CamomileLibrary.Type.UTF8.html" title="CamomileLibrary.Type.UTF8">Previous</a>
&nbsp;<a class="up" href="CamomileLibrary.Type.html" title="CamomileLibrary.Type">Up</a>
&nbsp;<a class="post" href="CamomileLibrary.Type.UCS4.html" title="CamomileLibrary.Type.UCS4">Next</a>
</div>
<h1>Module <a href="type_CamomileLibrary.Type.UTF16.html">CamomileLibrary.Type.UTF16</a></h1>

<pre><span class="keyword">module</span> UTF16: <code class="code">sig</code> <a href="CamomileLibrary.Type.UTF16.html">..</a> <code class="code">end</code></pre><hr width="100%">

<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> = <code class="type">(int, Bigarray.int16_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t</code> </pre>
<div class="info ">
UTF-16 encoded string. the type is the bigarray of 16-bit integers.
   The characters must be 21-bits code points, and not surrogate points,
   0xfffe, 0xffff.
   Bigarray.cma or Bigarray.cmxa must be linked when this module is used.<br>
</div>


<pre><span id="EXCEPTIONMalformed_code"><span class="keyword">exception</span> Malformed_code</span></pre>

<pre><span id="VALvalidate"><span class="keyword">val</span> validate</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<code class="code">validate s</code>
   If <code class="code">s</code> is valid UTF-16 then successes otherwise raises <code class="code">Malformed_code</code>.
   Other functions assume strings are valid UTF-16, so it is prudent
   to test their validity for strings from untrusted origins.<br>
</div>
<br>
All functions below assume strings are valid UTF-16.  If not,
   the result is unspecified.<br>

<pre><span id="VALget"><span class="keyword">val</span> get</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> int -> <a href="CamomileLibrary.Type.UChar.html#TYPEt">CamomileLibrary.Type.UChar.t</a></code></pre><div class="info ">
<code class="code">get s n</code> returns <code class="code">n</code>-th Unicode character of <code class="code">s</code>.
   The call requires O(n)-time.<br>
</div>

<pre><span id="EXCEPTIONOut_of_range"><span class="keyword">exception</span> Out_of_range</span></pre>

<pre><span id="VALinit"><span class="keyword">val</span> init</span> : <code class="type">int -> (int -> <a href="CamomileLibrary.Type.UChar.html#TYPEt">CamomileLibrary.Type.UChar.t</a>) -> <a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a></code></pre><div class="info ">
<code class="code">init len f</code>
   returns a new string which contains <code class="code">len</code> Unicode characters.
   The i-th Unicode character is initialized by <code class="code">f i</code> 
   if the character is not representable, raise <code class="code">Out_of_range</code>.<br>
</div>

<pre><span id="VALlength"><span class="keyword">val</span> length</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<code class="code">length s</code> returns the number of Unicode characters contained in s<br>
</div>

<pre><span id="TYPEindex"><span class="keyword">type</span> <code class="type"></code>index</span> = <code class="type">int</code> </pre>
<div class="info ">
Positions in the string represented by the number of 16-bit unit
   from the head.
   The location of the first character is <code class="code">0</code><br>
</div>


<pre><span id="VALnth"><span class="keyword">val</span> nth</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> int -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a></code></pre><div class="info ">
<code class="code">nth s n</code> returns the position of the <code class="code">n</code>-th Unicode character. 
   The call requires O(n)-time<br>
</div>

<pre><span id="VALfirst"><span class="keyword">val</span> first</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a></code></pre><div class="info ">
<code class="code">first s</code> : The position of the head of the last Unicode character.<br>
</div>

<pre><span id="VALlast"><span class="keyword">val</span> last</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a></code></pre><div class="info ">
<code class="code">last s</code> : The position of the head of the last Unicode character.<br>
</div>

<pre><span id="VALlook"><span class="keyword">val</span> look</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -><br>       <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> <a href="CamomileLibrary.Type.UChar.html#TYPEt">CamomileLibrary.Type.UChar.t</a></code></pre><div class="info ">
<code class="code">look s i </code>
   returns the Unicode character of the location <code class="code">i</code> in the string <code class="code">s</code>.<br>
</div>

<pre><span id="VALout_of_range"><span class="keyword">val</span> out_of_range</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> bool</code></pre><div class="info ">
<code class="code">out_of_range s i</code> tests whether <code class="code">i</code> is inside of <code class="code">s</code>.<br>
</div>

<pre><span id="VALcompare_index"><span class="keyword">val</span> compare_index</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -><br>       <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> int</code></pre><div class="info ">
<code class="code">compare_aux s i1 i2</code> returns<ul>
<li>If <code class="code">i1</code> is the position located before <code class="code">i2</code>, a value &lt; 0,</li>
<li>If <code class="code">i1</code> and <code class="code">i2</code> points the same location, 0,</li>
<li>If <code class="code">i1</code> is the position located after <code class="code">i2</code>, a value &gt; 0.</li>
</ul>
<br>
</div>

<pre><span id="VALnext"><span class="keyword">val</span> next</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -><br>       <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a></code></pre><div class="info ">
<code class="code">next s i</code>
   returns the position of the head of the Unicode character
   located immediately after <code class="code">i</code>. <ul>
<li>If <code class="code">i</code> is a valid position, the function always success.</li>
<li>If <code class="code">i</code> is a valid position and there is no Unicode character after <code class="code">i</code>,
   the position outside <code class="code">s</code> is returned.  </li>
<li>If <code class="code">i</code> is not a valid position, the behaviour is undefined.</li>
</ul>
<br>
</div>

<pre><span id="VALprev"><span class="keyword">val</span> prev</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -><br>       <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a></code></pre><div class="info ">
<code class="code">prev s i</code>
   returns the position of the head of the Unicode character
   located immediately before <code class="code">i</code>. <ul>
<li>If <code class="code">i</code> is a valid position, the function always success.</li>
<li>If <code class="code">i</code> is a valid position and there is no Unicode character before <code class="code">i</code>,
   the position outside <code class="code">s</code> is returned.  </li>
<li>If <code class="code">i</code> is not a valid position, the behaviour is undefined.</li>
</ul>
<br>
</div>

<pre><span id="VALmove"><span class="keyword">val</span> move</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -><br>       <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a> -> int -> <a href="CamomileLibrary.Type.UTF16.html#TYPEindex">index</a></code></pre>
<pre><span id="VALiter"><span class="keyword">val</span> iter</span> : <code class="type">(<a href="CamomileLibrary.Type.UChar.html#TYPEt">CamomileLibrary.Type.UChar.t</a> -> unit) -><br>       <a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<code class="code">iter f s</code>
   Apply <code class="code">f</code> to all Unicode characters in <code class="code">s</code>.  
   The order of application is same to the order 
   in the Unicode characters in <code class="code">s</code>.<br>
</div>

<pre><span id="VALcompare"><span class="keyword">val</span> compare</span> : <code class="type"><a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> <a href="CamomileLibrary.Type.UTF16.html#TYPEt">t</a> -> int</code></pre><div class="info ">
Code point comparison<br>
</div>

<pre><span class="keyword">module</span> <a href="CamomileLibrary.Type.UTF16.Buf.html">Buf</a>: <code class="code">sig</code> <a href="CamomileLibrary.Type.UTF16.Buf.html">..</a> <code class="code">end</code></pre><div class="info">
Buffer module for UTF-16
</div>
</body></html>