O'Reilly logo
  • Yan Ren thinks this is interesting:

dropRight

From

Cover of Scala for the Impatient, Second Edition

Note

remove last n characters and return the rest of the original string scala> "abcde".dropRight(2) res24: String = abc