package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20240429.tbz
sha256=222f8ac131b1d970dab7eeb2714bfd6b9338b88b1082e6e01c136ae19e7eaef4
sha512=c9e6d93e3d21e5530c0f4d5baca51bf1f0a5d19248f8af7678d0665bb5cdf295d7aaaaa3e50eb2e44b8720e55097cc675af4dc8ec45acf9da39feb3eae1405d5

doc/devkit.ocamlnet_lite/Ocamlnet_lite/Netstring_str/index.html

Module Ocamlnet_lite.Netstring_strSource

Sourcetype regexp

The type of regular expressions

Sourcetype split_result = Str.split_result =
  1. | Text of string
  2. | Delim of string
    (*

    Here we keep compatibility with Str

    *)
Sourcetype result

The type of matching results

Sourceval regexp : string -> regexp

Parses a regexp

Sourceval search_forward : regexp -> string -> int -> int * result

Searches a match of the string with the regexp, starting at * the position and in forward direction. * Raises Not_found if no match could be found. * Returns (p,r) when a match at position p is found, * described by r.

Sourceval quote_set : string -> string

Returns a regexp (as string) that matches any of the characters in the argument. The argument must be non-empty

Sourceval matched_string : result -> string -> string

Extracts the matched part from the string. The string argument * must be the same string passed to string_match or the search * functions, and the result argument must be the corresponding * result.

Sourceval match_beginning : result -> int

Returns the position where the matched part begins

Sourceval match_end : result -> int

Returns the position where the matched part ends

Sourceval matched_group : result -> int -> string -> string

Extracts the substring the nth group matches from the whole * string. The string argument * must be the same string passed to string_match or the search * functions, and the result argument must be the corresponding * result.

Sourceval full_split : regexp -> string -> split_result list

Like split_delim, but returns the delimiters in the result

Sourceval global_substitute : regexp -> (result -> string -> string) -> string -> string

global_substitute re subst s: Applies the substitution function * subst to all matchings of re in s, and returns the * transformed string. subst is called with the current result * of the match and the whole string s.

OCaml

Innovation. Community. Security.