rest()
public
Returns the “rest” of the string (i.e. everything after the scan pointer). If there is no more data
(eos? = true), it returns
"".
Show source
/*
* Returns the "rest" of the string (i.e. everything after the scan pointer).
* If there is no more data (eos? = true), it returns <tt>""</tt>.
*/
static VALUE
strscan_rest(VALUE self)
{
struct strscanner *p;
GET_SCANNER(self, p);
if (EOS_P(p)) {
return infect(rb_str_new("", 0), p);
}
return extract_range(p, p->curr, S_LEN(p));
}