Actually there is box support for chomp 1
scala> val input = "abcd\n" input: java.lang.String = abcd scala> "[%s]".format(input) res2: String = [abcd ] scala> val chomped = input.stripLineEnd chomped: String = abcd scala> "[%s]".format(chomped) res3: String = [abcd]
1 for some definition of chomp; really the same answer as sepp2k but showing how to use it on String
huynhjl
source share