Spec-Zone.ru › OCaml
☰The OCaml library
  • The core library
  • The standard library
  • The compiler front-end
  • The unix library: Unix system calls
  • The str library: regular expressions and string processing
  • The runtime_events library
  • The threads library
  • The dynlink library: dynamic loading and linking of object files
  • Recently removed or moved libraries (Graphics, Bigarray, Num, LablTk)

Chapter 33 The str library: regular expressions and string processing

The str 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 awk, perl or sed.

Programs that use the str library must be linked as follows:

        ocamlc other options -I +str str.cma other files
        ocamlopt other options  -I +str str.cmxa other files

For interactive use of the str library, do:

        ocamlmktop -o mytop str.cma
        ./mytop

or (if dynamic linking of C libraries is supported on your platform), start ocaml and type

# #directory "+str";;
# #load  "str.cma";;
  • Module Str: regular expressions and string processing
« The unix library: Unix system callsThe runtime_events library »
Copyright © 2026 Institut National de Recherche en Informatique et en Automatique

© 1995-2026 INRIA.
https://ocaml.org/manual/5.5/libstr.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API