View Problem

Remove leading and trailing whitespace from a string

Given the string "  hello    " return the string "hello".
ExpandDiskEdit
fsharp
let s = " hello "
let trimmed = s.Trim()
ExpandDiskEdit
fsharp
let trimmed = " hello ".Trim()
DiskEdit
clojure
(use 'clojure.contrib.str-utils2)
(trim " hello ")
DiskEdit
clojure 1.3
(clojure.string/trim " hello ")
DiskEdit
clojure
(.trim " hello ")

Submit a new solution for fsharp or clojure
There are 17 other solutions in additional languages (cpp, csharp, erlang, fantom ...)