ClojureDocs

Nav

Namespaces

Take the 2025 State of Clojure Survey! Help shape the future of Clojure. Take Survey →

trim-newline

clojure.string

Available since 1.2
  • (trim-newline s)
Removes all trailing newline \n or return \r characters from
string.  Similar to Perl's chomp.