Ruby: rmatch_offset Struct Reference

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

Data Fields
rmatch_offset Struct Reference

Represents the region of a capture group. More...

`#include <rmatch.h>`

## Data Fields
long | beg
| Beginning of a group.
long | end
| End of a group.

## Detailed Description

Represents the region of a capture group.

This is basically for caching purpose. re_registers have similar concepts (`beg` and `end`) but they are in `ptrdiff_t*`. In order for us to implement `MatchData#offset` that info has to be converted to offset integers. This is the struct to hold such things.

Definition at line 65 of file rmatch.h.

## Field Documentation

## ◆ beg

long rmatch_offset::beg

Beginning of a group.

Definition at line 66 of file rmatch.h.

## ◆ end

long rmatch_offset::end

End of a group.

Definition at line 67 of file rmatch.h.

The documentation for this struct was generated from the following file:

- include/ruby/internal/core/rmatch.h