aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/str_utils2.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/clojure/contrib/str_utils2.clj')
-rw-r--r--src/clojure/contrib/str_utils2.clj5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clojure/contrib/str_utils2.clj b/src/clojure/contrib/str_utils2.clj
index 33ed857c..8efbfd0a 100644
--- a/src/clojure/contrib/str_utils2.clj
+++ b/src/clojure/contrib/str_utils2.clj
@@ -88,8 +88,9 @@
(lazy-seq (f s 0))))
(defn escape
- "Escapes characters in string according to a cmap, a function or map
- from characters to their replacements."
+ "Returns a new String by applying cmap (a function or a map) to each
+ character in s. If cmap returns nil, the original character is
+ added to the output unchanged."
[#^String s cmap]
(let [buffer (StringBuilder. (.length s))]
(dochars [c s]