new(...)
public
Returns a new string object containing
a copy of str.
Show source
/*
* call-seq:
* String.new(str="") => new_str
*
* Returns a new string object containing a copy of <i>str</i>.
*/
static VALUE
rb_str_init(argc, argv, str)
int argc;
VALUE *argv;
VALUE str;
{
VALUE orig;
if (rb_scan_args(argc, argv, "01", &orig) == 1)
rb_str_replace(str, orig);
return str;
}