View Problem

Remove leading and trailing whitespace from a string

Given the string "  hello    " return the string "hello".
ExpandDiskEdit
scala
val s = " hello ".trim

Submit a new solution for scala
There are 22 other solutions in additional languages (clojure, cpp, csharp, erlang ...)