SimpleTextDiff (open)

Gives a simple text diff between the lines of the texts

Syntax

LOADLIB "wh::util/comparisons.whlib";

STRING FUNCTION SimpleTextDiff(STRING leftfile, STRING rightfile, RECORD options)

Parameters

STRING leftfile

Original (or expected) text

STRING rightfile

Modified (or actual) text

RECORD options

Options

color

If TRUE, add ANSI-color code to highlight differences

header

If TRUE, add a patch header, if FALSE output the whole file

Return value

STRING

Formatted difference between the two texts