1.2.0 permalink Arrow_down_16x16
  • (chomp s)
Removes all trailing newline \n or return \r characters from
string. Note: String.trim() is similar and faster.

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/str_utils2.clj:261 top

(defn ^String chomp
  "Removes all trailing newline \\n or return \\r characters from
  string.  Note: String.trim() is similar and faster."
  [^String s]
  (replace s #"[\r\n]+$" ""))
Vars in clojure.contrib.str-utils2/chomp: defn replace
Used in 0 other vars

Comments top

No comments for chomp. Log in to add a comment.