REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::compat::detail::offset_match< RealMatch > Class Template Reference

A REAL match found on a suffix of the subject, seen with the subject's offsets: what the format expander and the match-results fill read (size, start, end). More...

#include <regex_match.hpp>

Public Member Functions

 offset_match (const RealMatch &match, std::size_t offset) noexcept
 Sees match, found on the suffix starting at offset, with the subject's offsets.
 
std::size_t size () const noexcept
 The group count, whole match included.
 
std::size_t start (std::size_t g) const noexcept
 Group g's start in the subject.
 
std::size_t end (std::size_t g) const noexcept
 Group g's end in the subject.
 

Private Attributes

const RealMatch * match_
 The match, found on the suffix.
 
std::size_t offset_
 Where the suffix starts in the subject.
 

Detailed Description

template<typename RealMatch>
class real::compat::detail::offset_match< RealMatch >

A REAL match found on a suffix of the subject, seen with the subject's offsets: what the format expander and the match-results fill read (size, start, end).

Template Parameters
RealMatchThe engine's match type.

Constructor & Destructor Documentation

◆ offset_match()

template<typename RealMatch >
real::compat::detail::offset_match< RealMatch >::offset_match ( const RealMatch &  match,
std::size_t  offset 
)
inlinenoexcept

Sees match, found on the suffix starting at offset, with the subject's offsets.

Parameters
[in]matchThe match; it must outlive this view.
[in]offsetWhere the suffix starts in the subject.

Member Function Documentation

◆ end()

template<typename RealMatch >
std::size_t real::compat::detail::offset_match< RealMatch >::end ( std::size_t  g) const
inlinenoexcept

Group g's end in the subject.

Parameters
[in]gThe group.
Returns
The offset, or real::npos when the group took no part.

◆ size()

template<typename RealMatch >
std::size_t real::compat::detail::offset_match< RealMatch >::size ( ) const
inlinenoexcept

The group count, whole match included.

Returns
The count.

◆ start()

template<typename RealMatch >
std::size_t real::compat::detail::offset_match< RealMatch >::start ( std::size_t  g) const
inlinenoexcept

Group g's start in the subject.

Parameters
[in]gThe group.
Returns
The offset, or real::npos when the group took no part.

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