string replace
The form of this function:
(replace s match replacement)
Where match/replacement can be:
- string/string
- char/char
- pattern/string
- pattern/function
Spec’ing
(s/fdef clojure.string/replace
:args (s/alt :string-string (s/cat :s string?
:match string?
:replacement string?)
:char-char (s/cat :s string?
:match char?
:replacement char?)
:pattern-string (s/cat :s string?
:match pattern?
:replacement string?)
:pattern-function (s/cat :s string?
:match pattern?
:replacement ifn?))
:ret string?)