Removes all trailing newline \n or return \r characters from
string. Note: String.trim() is similar and faster.
(defn chomp "Removes all trailing newline \\n or return \\r characters from string. Note: String.trim() is similar and faster." [s] (re-sub #"[\r\n]+$" "" s))
Comments top
No comments for chomp. Log in to add a comment.