Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::editor::TextPatch Struct Reference

A byte-level splice in the source text buffer. More...

#include "donner/editor/TextPatch.h"

Public Attributes

std::size_t offset = 0
 Byte offset in the source text.
std::size_t length = 0
 Number of bytes to replace (0 = pure insert).
std::string replacement
 New text to splice in (empty = pure delete).

Detailed Description

A byte-level splice in the source text buffer.

Represents "replace `length` bytes starting at `offset` with `replacement`." Patches are applied in descending offset order by applyPatches so earlier patches don't shift the byte offsets of later ones.

Member Data Documentation

◆ length

std::size_t donner::editor::TextPatch::length = 0

Number of bytes to replace (0 = pure insert).

◆ offset

std::size_t donner::editor::TextPatch::offset = 0

Byte offset in the source text.

◆ replacement

std::string donner::editor::TextPatch::replacement

New text to splice in (empty = pure delete).


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