Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 19bb6433bb07a8b16410504336791904 > files > 16

ocaml-doc-3.06-5mdk.ppc.rpm

<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="Start" href="index.html">
<link rel="previous" href="Bigarray.html">
<link rel="next" href="Callback.html">
<link rel="Up" href="index.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 modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Arg" rel="Chapter" href="Arg.html">
<link title="Arith_status" rel="Chapter" href="Arith_status.html">
<link title="Array" rel="Chapter" href="Array.html">
<link title="ArrayLabels" rel="Chapter" href="ArrayLabels.html">
<link title="Big_int" rel="Chapter" href="Big_int.html">
<link title="Bigarray" rel="Chapter" href="Bigarray.html">
<link title="Buffer" rel="Chapter" href="Buffer.html">
<link title="Callback" rel="Chapter" href="Callback.html">
<link title="CamlinternalOO" rel="Chapter" href="CamlinternalOO.html">
<link title="Char" rel="Chapter" href="Char.html">
<link title="Complex" rel="Chapter" href="Complex.html">
<link title="Condition" rel="Chapter" href="Condition.html">
<link title="Dbm" rel="Chapter" href="Dbm.html">
<link title="Digest" rel="Chapter" href="Digest.html">
<link title="Dynlink" rel="Chapter" href="Dynlink.html">
<link title="Event" rel="Chapter" href="Event.html">
<link title="Filename" rel="Chapter" href="Filename.html">
<link title="Format" rel="Chapter" href="Format.html">
<link title="Gc" rel="Chapter" href="Gc.html">
<link title="Genlex" rel="Chapter" href="Genlex.html">
<link title="Graphics" rel="Chapter" href="Graphics.html">
<link title="GraphicsX11" rel="Chapter" href="GraphicsX11.html">
<link title="Hashtbl" rel="Chapter" href="Hashtbl.html">
<link title="Int32" rel="Chapter" href="Int32.html">
<link title="Int64" rel="Chapter" href="Int64.html">
<link title="Lazy" rel="Chapter" href="Lazy.html">
<link title="Lexing" rel="Chapter" href="Lexing.html">
<link title="List" rel="Chapter" href="List.html">
<link title="ListLabels" rel="Chapter" href="ListLabels.html">
<link title="Map" rel="Chapter" href="Map.html">
<link title="Marshal" rel="Chapter" href="Marshal.html">
<link title="MoreLabels" rel="Chapter" href="MoreLabels.html">
<link title="Mutex" rel="Chapter" href="Mutex.html">
<link title="Nativeint" rel="Chapter" href="Nativeint.html">
<link title="Num" rel="Chapter" href="Num.html">
<link title="Obj" rel="Chapter" href="Obj.html">
<link title="Oo" rel="Chapter" href="Oo.html">
<link title="Parsing" rel="Chapter" href="Parsing.html">
<link title="Pervasives" rel="Chapter" href="Pervasives.html">
<link title="Printexc" rel="Chapter" href="Printexc.html">
<link title="Printf" rel="Chapter" href="Printf.html">
<link title="Queue" rel="Chapter" href="Queue.html">
<link title="Random" rel="Chapter" href="Random.html">
<link title="Scanf" rel="Chapter" href="Scanf.html">
<link title="Set" rel="Chapter" href="Set.html">
<link title="Sort" rel="Chapter" href="Sort.html">
<link title="Stack" rel="Chapter" href="Stack.html">
<link title="StdLabels" rel="Chapter" href="StdLabels.html">
<link title="Str" rel="Chapter" href="Str.html">
<link title="Stream" rel="Chapter" href="Stream.html">
<link title="String" rel="Chapter" href="String.html">
<link title="StringLabels" rel="Chapter" href="StringLabels.html">
<link title="Sys" rel="Chapter" href="Sys.html">
<link title="Thread" rel="Chapter" href="Thread.html">
<link title="ThreadUnix" rel="Chapter" href="ThreadUnix.html">
<link title="Tk" rel="Chapter" href="Tk.html">
<link title="Unix" rel="Chapter" href="Unix.html">
<link title="UnixLabels" rel="Chapter" href="UnixLabels.html">
<link title="Weak" rel="Chapter" href="Weak.html"><title>Buffer</title>
</head>
<body>
<div class="navbar"><a href="Bigarray.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Callback.html">Next</a>
</div>
<center><h1>Module <a href="type_Buffer.html">Buffer</a></h1></center>
<br>
<pre><span class="keyword">module</span> Buffer: <code class="type">sig  end</code></pre><div class="info">
Extensible string buffers.
<p>

   This module implements string buffers that automatically expand
   as necessary.  It provides accumulative concatenation of strings
   in quasi-linear time (instead of quadratic time when strings are
   concatenated pairwise).<br>
</div>
<hr width="100%">
<br><code><span class="keyword">type</span> <a name="TYPEt"></a>t </code>
<div class="info">
The abstract type of buffers.<br>
</div>
<br>
<pre><span class="keyword">val</span> <a name="VALcreate"></a>create : <code class="type">int -> <a href="Buffer.html#TYPEt">t</a></code></pre><div class="info">
<code class="code">create n</code> returns a fresh buffer, initially empty.
   The <code class="code">n</code> parameter is the initial size of the internal string
   that holds the buffer contents.  That string is automatically
   reallocated when more than <code class="code">n</code> characters are stored in the buffer,
   but shrinks back to <code class="code">n</code> characters when <code class="code">reset</code> is called.
   For best performance, <code class="code">n</code> should be of the same order of magnitude
   as the number of characters that are expected to be stored in
   the buffer (for instance, 80 for a buffer that holds one output
   line).  Nothing bad will happen if the buffer grows beyond that
   limit, however.  In doubt, take <code class="code">n = 16</code> for instance.
   If <code class="code">n</code> is not between 1 and <a href="Sys.html#VALmax_string_length"><code class="code"><span class="constructor">Sys</span>.max_string_length</code></a>, it will
   be clipped to that interval.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcontents"></a>contents : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> string</code></pre><div class="info">
Return a copy of the current contents of the buffer.
   The buffer itself is unchanged.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALlength"></a>length : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> int</code></pre><div class="info">
Return the number of characters currently contained in the buffer.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALclear"></a>clear : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> unit</code></pre><div class="info">
Empty the buffer.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALreset"></a>reset : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> unit</code></pre><div class="info">
Empty the buffer and deallocate the internal string holding the
   buffer contents, replacing it with the initial internal string
   of length <code class="code">n</code> that was allocated by <a href="Buffer.html#VALcreate"><code class="code"><span class="constructor">Buffer</span>.create</code></a> <code class="code">n</code>.
   For long-lived buffers that may have grown a lot, <code class="code">reset</code> allows
   faster reclaimation of the space used by the buffer.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALadd_char"></a>add_char : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> char -> unit</code></pre><div class="info">
<code class="code">add_char b c</code> appends the character <code class="code">c</code> at the end of the buffer <code class="code">b</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALadd_string"></a>add_string : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> string -> unit</code></pre><div class="info">
<code class="code">add_string b s</code> appends the string <code class="code">s</code> at the end of the buffer <code class="code">b</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALadd_substring"></a>add_substring : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> string -> int -> int -> unit</code></pre><div class="info">
<code class="code">add_substring b s ofs len</code> takes <code class="code">len</code> characters from offset
   <code class="code">ofs</code> in string <code class="code">s</code> and appends them at the end of the buffer <code class="code">b</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALadd_buffer"></a>add_buffer : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> <a href="Buffer.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">add_buffer b1 b2</code> appends the current contents of buffer <code class="code">b2</code>
   at the end of buffer <code class="code">b1</code>.  <code class="code">b2</code> is not modified.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALadd_channel"></a>add_channel : <code class="type"><a href="Buffer.html#TYPEt">t</a> -> <a href="Pervasives.html#TYPEin_channel">Pervasives.in_channel</a> -> int -> unit</code></pre><div class="info">
<code class="code">add_channel b ic n</code> reads exactly <code class="code">n</code> character from the
   input channel <code class="code">ic</code> and stores them at the end of buffer <code class="code">b</code>.
   Raise <code class="code"><span class="constructor">End_of_file</span></code> if the channel contains fewer than <code class="code">n</code>
   characters.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALoutput_buffer"></a>output_buffer : <code class="type"><a href="Pervasives.html#TYPEout_channel">Pervasives.out_channel</a> -> <a href="Buffer.html#TYPEt">t</a> -> unit</code></pre><div class="info">
<code class="code">output_buffer oc b</code> writes the current contents of buffer <code class="code">b</code>
   on the output channel <code class="code">oc</code>.<br>
</div>
</body></html>