method

strip

v1_8_7_72 - 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"