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!

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