(replace-first s match replacement)
Replaces the first instance of match with replacement in s.
match/replacement can be:
string / string
pattern / (string or function of match).
Source
(defn
replace-first
"Replaces the first instance of match with replacement in s.\n match/replacement can be:\n\n string / string\n pattern / (string or function of match)."
[s match replacement]
(.replace s match replacement))