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
static VALUE
strscan_rest(VALUE self)
{
struct strscanner *p;
GET_SCANNER(self, p);
if (EOS_P(p)) {
return infect(str_new(p, "", 0), p);
}
return extract_range(p, p->curr, S_LEN(p));
}