Command line version of String.chomp