String replacement helpers.
String replacement helpers.
(replace-all-tokens token template value)
Replaces all matches of a given token with value;
Replaces all matches of a given token with value;
(replace-first-token token template value)
Replaces the first match of a given token with value.
Replaces the first match of a given token with value.
(replace-from-map template map-data)
Replaces all matches from a map key with it's values.
Replaces all matches from a map key with it's values.
(replace-kv template [k v])
Replaces the key (k) with the value (v) in a given string template.
Replaces the key (k) with the value (v) in a given string template.
(replace-sequential template token sequence)
Replaces the matches of a given token with the sequence values. E.g.: (replace-sequential "My name is % %" "%" ["Iago" "Oliveira"]) Will produce the input: "My name is Iago Oliveira"
Replaces the matches of a given token with the sequence values. E.g.: (replace-sequential "My name is % %" "%" ["Iago" "Oliveira"]) Will produce the input: "My name is Iago Oliveira"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close