Immutable bounded token collection; copies retain one input and its metadata without copying text.
More...
#include <text_transform.hpp>
|
|
| ~TextSegments ()=default |
| | Release one immutable collection owner; rvalue transfer retains a valid shared-owner source.
|
| std::size_t | size () const noexcept |
| std::expected< TextSegment, TreeError > | at (std::size_t index) const |
| bool | operator== (const TextSegments &other) const noexcept |
Immutable bounded token collection; copies retain one input and its metadata without copying text.
◆ at()
- Parameters
-
| index | Zero-based token ordinal. |
- Returns
- Independently owner-retaining segment, or INVALID_ARGUMENT for an out-of-range ordinal.
◆ operator==()
| bool portals::TextSegments::operator== |
( |
const TextSegments & | other | ) |
const |
|
noexcept |
- Parameters
-
| other | Immutable ordered collection to compare. |
- Returns
- Equal token bytes and policy; delimiter offsets in original inputs are not compared.
◆ size()
| std::size_t portals::TextSegments::size |
( |
| ) |
const |
|
noexcept |
- Returns
- Number of whole tokens, distinct from UTF-8 byte/scalar count.
The documentation for this class was generated from the following file: