patch: Create and apply patches to a text string

Description Usage Arguments Value Examples

Description

Patches are constructed via patch_make() and applied using patch_apply().

Usage

1
2
3

Arguments

x

The source string

y

The destination string

patch

A string representation of the patch(es).

Value

patch_make() returns a string representation of the patch(es).

Examples

1
2
3
4
5
6
7
8
9
(p = patch_make("abcdef", "abchij"))

patch_apply("abcdef", p)

patch_apply("abc", p)

patch_apply("def", p)

patch_apply("hij", p)

diffmatchpatch documentation built on April 16, 2021, 9:06 a.m.