strip()
public
Returns a copy of str with leading and trailing whitespace
removed.
" hello ".strip
"\tgoodbye\r\n".strip
Show source
/*
* call-seq:
* str.strip => new_str
*
* Returns a copy of <i>str</i> with leading and trailing whitespace removed.
*
* " hello ".strip
* "\tgoodbye\r\n".strip
*/
static VALUE
rb_str_strip(str)
VALUE str;
{
str = rb_str_dup(str);
rb_str_strip_bang(str);
return str;
}