/usr/share/doc/libmikmatch-ocaml-dev/mikmatch-ocamldoc/Mikmatch.Text.html is in libmikmatch-ocaml-dev 1.0.7-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | <!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="next" href="Mikmatch.Fixed.html">
<link rel="Up" href="Mikmatch.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="Mikmatch" rel="Chapter" href="Mikmatch.html"><title>Mikmatch.Text</title>
</head>
<body>
<div class="navbar"> <a class="up" href="Mikmatch.html" title="Mikmatch">Up</a>
<a class="post" href="Mikmatch.Fixed.html" title="Mikmatch.Fixed">Next</a>
</div>
<h1>Module <a href="type_Mikmatch.Text.html">Mikmatch.Text</a></h1>
<pre><span class="keyword">module</span> Text: <code class="code">sig</code> <a href="Mikmatch.Text.html">..</a> <code class="code">end</code></pre><hr width="100%">
<br>
This module provides some general functions which are especially
useful for manipulating text and text files.<br>
<pre><span id="VALiter_lines_of_channel"><span class="keyword">val</span> iter_lines_of_channel</span> : <code class="type">(string -> unit) -> Pervasives.in_channel -> unit</code></pre><div class="info ">
<code class="code">iter_lines_of_channel f ic</code> reads input channel <code class="code">ic</code>
and applies successively the given function <code class="code">f</code> to
each line until the end of file is reached.<br>
</div>
<pre><span id="VALiter_lines_of_file"><span class="keyword">val</span> iter_lines_of_file</span> : <code class="type">(string -> unit) -> string -> unit</code></pre><div class="info ">
<code class="code">iter_lines_of_file f file</code> reads file <code class="code">file</code>
and applies successively the given function <code class="code">f</code> to
each line until the end of file is reached.<br>
</div>
<pre><span id="VALlines_of_channel"><span class="keyword">val</span> lines_of_channel</span> : <code class="type">Pervasives.in_channel -> string list</code></pre><div class="info ">
<code class="code">lines_of_channel ic</code> returns the list of the lines that can be
read from input channel <code class="code">ic</code>.<br>
</div>
<pre><span id="VALlines_of_file"><span class="keyword">val</span> lines_of_file</span> : <code class="type">string -> string list</code></pre><div class="info ">
<code class="code">lines_of_file file</code> returns the list of the lines that can be
read from file <code class="code">file</code>.<br>
</div>
<pre><span id="VALchannel_contents"><span class="keyword">val</span> channel_contents</span> : <code class="type">Pervasives.in_channel -> string</code></pre><div class="info ">
<code class="code">channel_contents ic</code> returns the string containing the bytes
that can be read from the given input channel <code class="code">ic</code>.<br>
</div>
<pre><span id="VALfile_contents"><span class="keyword">val</span> file_contents</span> : <code class="type">?bin:bool -> string -> string</code></pre><div class="info ">
<code class="code">file_contents file</code> returns the string containing the bytes
that can be read from the given file.
Option <code class="code">bin</code> specifies if <code class="code">Pervasives.open_in_bin</code> should be
used instead of <code class="code">Pervasives.open_in</code> to open the file. Default is
<code class="code">false</code>.<br>
</div>
<pre><span id="VALsave"><span class="keyword">val</span> save</span> : <code class="type">string -> string -> unit</code></pre><div class="info ">
<code class="code">save file data</code> stores the string <code class="code">data</code> in <code class="code">file</code>.
If the file already exists, its contents is discarded silently.<br>
</div>
<pre><span id="VALsave_lines"><span class="keyword">val</span> save_lines</span> : <code class="type">string -> string list -> unit</code></pre><div class="info ">
<code class="code">save_lines file l</code> saves the given list <code class="code">l</code> of strings in <code class="code">file</code>
and adds a newline characters (<code class="code">'\n'</code>) after each of them.
If the file already exists, its contents is discarded silently.<br>
</div>
<pre><span id="EXCEPTIONSkip"><span class="keyword">exception</span> Skip</span></pre>
<div class="info ">
This exception can be used to skip an element of a list being
processed with <code class="code">rev_map</code>, <code class="code">map</code>, <code class="code">fold_left</code>, and <code class="code">fold_right</code>.<br>
</div>
<pre><span id="VALmap"><span class="keyword">val</span> map</span> : <code class="type">('a -> 'b) -> 'a list -> 'b list</code></pre><div class="info ">
Like <code class="code">List.map</code> but it is guaranteed that
the elements of the input list are processed from left to right.
Moreover the <code class="code">Skip</code> exception can be used to skip an element
of the list.
This function runs in constant stack space.<br>
</div>
<pre><span id="VALrev_map"><span class="keyword">val</span> rev_map</span> : <code class="type">('a -> 'b) -> 'a list -> 'b list</code></pre><div class="info ">
Like <code class="code">List.rev_map</code>, but it is guaranteed that
the elements of the input list are processed from left to right.
Moreover the <code class="code">Skip</code> exception can be used to skip an element
of the list.
This function runs in constant stack space and is slightly faster
then <code class="code">map</code>.<br>
</div>
<pre><span id="VALfold_left"><span class="keyword">val</span> fold_left</span> : <code class="type">('a -> 'b -> 'a) -> 'a -> 'b list -> 'a</code></pre><div class="info ">
Like <code class="code">List.fold_left</code>
but the <code class="code">Skip</code> exception can be used to skip an element
of the list.
This function runs in constant stack space.<br>
</div>
<pre><span id="VALfold_right"><span class="keyword">val</span> fold_right</span> : <code class="type">('a -> 'b -> 'b) -> 'a list -> 'b -> 'b</code></pre><div class="info ">
Like <code class="code">List.fold_right</code>
but the <code class="code">Skip</code> exception can be used to skip an element
of the list.
This function runs in constant stack space.<br>
</div>
<pre><span id="VALmap_lines_of_channel"><span class="keyword">val</span> map_lines_of_channel</span> : <code class="type">(string -> 'a) -> Pervasives.in_channel -> 'a list</code></pre><div class="info ">
<code class="code">map_lines_of_channel f ic</code> is equivalent to
<code class="code">map f (lines_of_channel ic)</code> but faster.<br>
</div>
<pre><span id="VALmap_lines_of_file"><span class="keyword">val</span> map_lines_of_file</span> : <code class="type">(string -> 'a) -> string -> 'a list</code></pre><div class="info ">
<code class="code">map_lines_of_file f file</code> is equivalent to
<code class="code">map f (lines_of_file file)</code> but faster.<br>
</div>
</body></html>
|