dune/src/string_with_vars.mli

22 lines
514 B
OCaml
Raw Normal View History

2016-12-23 15:32:23 +00:00
(** String with variables of the form ${...} or $(...)
Variables cannot contain "${", "$(", ")" or "}". For instance in "$(cat ${x})", only
"${x}" will be considered a variable, the rest is text. *)
2016-12-02 13:54:32 +00:00
open Import
type t
2017-02-25 17:53:39 +00:00
val t : t Sexp.Of_sexp.t
2017-02-21 17:13:30 +00:00
val sexp_of_t : t -> Sexp.t
2016-12-02 13:54:32 +00:00
val of_string : string -> t
val raw : string -> t
2016-12-02 13:54:32 +00:00
val just_a_var : t -> string option
2016-12-02 13:54:32 +00:00
val vars : t -> String_set.t
val fold : t -> init:'a -> f:('a -> string -> 'a) -> 'a
val expand : t -> f:(string -> string option) -> string