Method: MatchData#end
- Defined in:
- re.c
#end(n) ⇒ Integer #end(name) ⇒ Integer
:include: doc/matchdata/end.rdoc
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 |
# File 're.c', line 1382
static VALUE
match_end(VALUE match, VALUE n)
{
int i = match_backref_number(match, n);
struct re_registers *regs = RMATCH_REGS(match);
match_check(match);
backref_number_check(regs, i);
if (BEG(i) < 0)
return Qnil;
update_char_offset(match);
return LONG2NUM(RMATCH_EXT(match)->char_offset[i].end);
}
|