package smtml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val v : string -> term

v s constructs a string term from the string s.

val length : term -> term

length t constructs the length of the string term t.

val to_code : term -> term

to_code t constructs the Unicode code point of the first character in the string term t.

val of_code : term -> term

of_code t constructs a string term from the Unicode code point t.

val to_int : term -> term

to_int t converts the string term t to an integer term.

val of_int : term -> term

of_int t converts the integer term t to a string term.

val to_re : term -> term

to_re t converts the string term t to a regular expression term.

val at : term -> pos:term -> term

at t ~pos constructs the character at position pos in the string term t.

val concat : term list -> term

concat ts constructs the concatenation of a list of string terms ts.

val contains : term -> sub:term -> term

contains t ~sub checks if the string term t contains the substring sub.

val is_prefix : term -> prefix:term -> term

is_prefix t ~prefix checks if the string term t starts with the prefix prefix.

val is_suffix : term -> suffix:term -> term

is_suffix t ~suffix checks if the string term t ends with the suffix suffix.

val in_re : term -> term -> term

in_re t re checks if the string term t matches the regular expression re.

val lt : term -> term -> term

lt t1 t2 constructs the less-than relation between string terms t1 and t2.

val le : term -> term -> term

le t1 t2 constructs the less-than-or-equal relation between string terms t1 and t2.

val sub : term -> pos:term -> len:term -> term

sub t ~pos ~len constructs the substring of t starting at pos with length len.

val index_of : term -> sub:term -> pos:term -> term

index_of t ~sub ~pos constructs the index of the first occurrence of sub in t starting at pos.

val replace : term -> pattern:term -> with_:term -> term

replace t ~pattern ~with_ constructs the string term resulting from replacing pattern with with_ in t.

OCaml

Innovation. Community. Security.