Module Oui.String_with_varsSource

Sourcetype t
Sourceval to_yojson : t -> Yojson.Safe.t
Sourceval of_string : string -> t

Builds a string with variables from the raw string

Sourceval to_string : t -> string

Returns the raw string with variables unexpanded

Sourcetype subst_result = {
  1. subst_string : string;
  2. unknown_vars : string list;
}
Sourceval subst : install_path:string -> t -> subst_result

Return the input strings with known variables substituted by the provided values and the list of unknown variables that were found in the input. E.g. subst ~install_path:"XX" "<install_path>/lib/<unknown>" will return {subst_string = "XX/lib/<unknown>"; unknown_vars = ["<unknown>"]}.