Module Typed.String

type t = string expr
val v : string -> t

v s constructs a string term from the string s.

val symbol : Symbol.t -> t

symbol sym constructs a string term from the symbol sym.

val length : t -> int expr

length t constructs the length of the string term t.

val at : t -> pos:int expr -> t

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

val concat : t list -> t

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

val contains : t -> sub:t -> bool expr

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

val is_prefix : t -> prefix:t -> bool expr

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

val is_suffix : t -> suffix:t -> bool expr

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

val eq : t -> t -> bool expr

Alias for Bool.eq.

val lt : t -> t -> bool expr

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

val le : t -> t -> bool expr

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

val sub : t -> pos:int expr -> len:int expr -> t

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

val index_of : t -> sub:t -> pos:int expr -> int expr

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

val replace : t -> pattern:t -> with_:t -> t

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

val replace_all : t -> pattern:t -> with_:t -> t

replace_all t ~pattern ~with_ constructs the string term resulting from replacing all occurrences of pattern with with_ in t.

val replace_re : t -> pattern:regexp expr -> with_:t -> t

replace_re t ~pattern ~with_ constructs the string term resulting from replacing the first occurrence matching the regular expression pattern with with_ in t.

val replace_re_all : t -> pattern:regexp expr -> with_:t -> t

replace_re_all t ~pattern ~with_ constructs the string term resulting from replacing all occurrences matching the regular expression pattern with with_ in t.

val to_code : t -> int expr

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

val of_code : int expr -> t

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

val to_int : t -> int expr

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

val of_int : int expr -> t

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

val to_re : t -> regexp expr

to_re t converts the string term t to a regular expression matching that exact string.

val in_re : t -> regexp expr -> bool expr

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

val pp : t Fmt.t
module Re : sig ... end