ClojureDocs

Nav

Namespaces

Clojure/Conj 2026 — Charlotte, NC — Sept 30 - Oct 2 Learn More & Get Tickets →

trim-newline

clojure.string

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