File: libstr.html

package info (click to toggle)
ocaml-doc 4.11-2
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 20,580 kB
  • sloc: sh: 37; makefile: 11
file content (40 lines) | stat: -rw-r--r-- 2,068 bytes parent folder | download
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
<!DOCTYPE html>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="hevea 2.32">

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="manual.css">
<title>Chapter 30  The str library: regular expressions and string processing</title>
</head>
<body>
<a href="libnum.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="index.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="libthreads.html"><img src="next_motif.svg" alt="Next"></a>
<hr>
<h1 class="chapter" id="sec583">Chapter 30  The str library: regular expressions and string processing</h1>
<p>The <span class="c003">str</span> library provides high-level string processing functions,
some based on regular expressions. It is intended to support the kind
of file processing that is usually performed with scripting languages
such as <span class="c003">awk</span>, <span class="c003">perl</span> or <span class="c003">sed</span>.</p><p>Programs that use the <span class="c003">str</span> library must be linked as follows:
</p><pre>
        ocamlc <span class="c009">other options</span> str.cma <span class="c009">other files</span>
        ocamlopt <span class="c009">other options</span> str.cmxa <span class="c009">other files</span>
</pre><p>
For interactive use of the <span class="c003">str</span> library, do:
</p><pre>
        ocamlmktop -o mytop str.cma
        ./mytop
</pre><p>
or (if dynamic linking of C libraries is supported on your platform),
start <span class="c003">ocaml</span> and type <span class="c003">#load "str.cma";;</span>.</p><ul class="ftoc2"><li class="li-links">
<a href="libref/Str.html">Module <span class="c003">Str</span>: regular expressions and string processing</a>
</li></ul>
<hr>
<a href="libnum.html"><img src="previous_motif.svg" alt="Previous"></a>
<a href="index.html"><img src="contents_motif.svg" alt="Up"></a>
<a href="libthreads.html"><img src="next_motif.svg" alt="Next"></a>
</body>
</html>