mfat.bos
Mfat_bos.Pat
mfat
mfat.unix
type t
The type for named string patterns.
type defs
The type for pattern variable definitions.
val of_string : string -> (t, [> `Msg of string ]) result
of_string s parses s as a named string pattern.
of_string s
s
val v : string -> t
v s is like of_string but raises Invalid_argument on error.
v s
of_string
Invalid_argument
val to_string : t -> string
to_string p is the string representation of p.
to_string p
p
val matches : t -> string -> bool
matches p s is true iff s matches pattern p.
matches p s
true
val query : ?init:defs -> t -> string -> defs option
query ~init p s matches s against p and returns the variable bindings added to init.
query ~init p s
init