Removes all trailing newline \n or return \r characters from
string. Note: String.trim() is similar and faster.
(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]+$" ""))
Comments top
No comments for chomp. Log in to add a comment.