method

strip

v1_8_6_287 - Show latest stable - Class: String
strip()
public

Returns a copy of str with leading and trailing whitespace removed.

   "    hello    ".strip   #=> "hello"
   "\tgoodbye\r\n".strip   #=> "goodbye"