1.2.0 permalink Arrow_down_16x16

replace-first-str

clojure.contrib.string

  • (replace-first-str a b s)
Replace first occurance of substring a with b in s.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/string.clj:183 top

(defn replace-first-str
  "Replace first occurance of substring a with b in s."
  {:deprecated "1.2"}
  [^String a ^String b ^String s]
  (.replaceFirst (re-matcher (Pattern/quote a) s) b))
Vars in clojure.contrib.string/replace-first-str: defn re-matcher
Used in 0 other vars

Comments top

No comments for replace-first-str. Log in to add a comment.