Skip to content

applyTextEdits

applyTextEdits(source, edits): string

Defined in: packages/core/src/string/apply-text-edits.ts:25

Applies a set of TextEdits to source.

Edits must be non-overlapping. Applies in descending offset order to avoid invalidating subsequent offsets.

string

The source string to apply edits to

TextEdit[]

The edits to apply

string

The modified string after applying the edits