Module SkhcQuery.FormatSource

A library for extracting key from string.

Sourcemodule Node : sig ... end

Operations on Format's Node

Sourcetype t

type of a format

Sourceval map : (Node.t -> Node.t) -> t -> t
Sourceval of_string : string -> t

of_string s parses the string s to build a format where keys as defined in Keys are mapped to Node.t.

Sourceval to_string : t -> string

to_string s outputs the format back to a string.

Sourceval to_text : t -> string

to_text s outputs the format back to a string but ignores all nodes except Node.t.Text.

Sourceval equal : t -> t -> bool

equal lhs rhs tests whether lhs and rhs are equals.

Sourceval substitute : (Node.t * string) list -> t -> t

substitute assoc format tries to substitute nodes in format by Node.t.Text if the node is found in assoc. Otherwise, the format node is unchanged.

Sourceval to_list : t -> Node.t list

to_list format turns format into a list of format nodes.

Sourceval of_list : Node.t list -> t

of_list nodes builds a format from a list of format node.