instance method
StringScanner#eos?
() -> bool
eos? → true or false
ext/strscan/strscan.c
View on GitHub ↗
static VALUE
strscan_eos_p(VALUE self)
{
struct strscanner *p;
GET_SCANNER(self, p);
return EOS_P(p) ? Qtrue : Qfalse;
}
Returns whether the position is at the end of the stored string:
Example
scanner = StringScanner.new('foobarbaz') scanner.eos? # => false pos = 3 scanner.eos? # => false scanner.terminate scanner.eos? # => true