View Problem

Remove leading and trailing whitespace from a string

Given the string "  hello    " return the string "hello".
DiskEdit
ruby
puts " hello ".strip
DiskEdit
ruby
" hello ".strip!
DiskEdit
clojure
(use 'clojure.contrib.str-utils2)
(trim " hello ")
DiskEdit
clojure 1.3
(clojure.string/trim " hello ")
DiskEdit
clojure
(.trim " hello ")
ExpandDiskEdit
erlang
Trimmed = string:strip(S),

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