Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::TextSegment Class Reference

One immutable whole-grapheme byte range retaining its original owning input. More...

#include <text_transform.hpp>

Public Member Functions

 ~TextSegment ()=default
 Release a shared input owner; rvalue transfer uses the nonallocating shared-owner copy.
std::string_view bytes () const noexcept
WidthPolicy policy () const noexcept
GraphemeText text () const
bool operator== (const TextSegment &other) const noexcept

Friends

class TextSegments

Detailed Description

One immutable whole-grapheme byte range retaining its original owning input.

Member Function Documentation

◆ bytes()

std::string_view portals::TextSegment::bytes ( ) const
noexcept
Returns
Borrowed token bytes, valid until this segment is assigned or destroyed.

◆ operator==()

bool portals::TextSegment::operator== ( const TextSegment & other) const
noexcept
Parameters
otherOwning token to compare.
Returns
Equal token bytes and width policy, independently of original offsets/storage.

◆ policy()

WidthPolicy portals::TextSegment::policy ( ) const
noexcept
Returns
Width policy of the retained immutable input.

◆ text()

GraphemeText portals::TextSegment::text ( ) const
Returns
Owning segmented token under its input policy; allocation failures propagate.

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