ContextDiffer class
Generates the context format
of diff -c
.
The context format introduced at Berkeley helped with distributing patches for source code that have been changed minimally.
In the context format, any changed lines are shown alongside unchanged lines before and after. The context format introduces greater readability for humans and reliability when applying the patch, and an output which is accepted as input to the patch program.
Constructors
- ContextDiffer({int context = 3})
Properties
Methods
-
compareLines(
Iterable< String> source, Iterable<String> target, {String? sourceLabel, String? targetLabel}) → Iterable<String> -
Compares two iterables of lines from
source
totarget
.override -
compareStrings(
String source, String target, {String? sourceLabel, String? targetLabel}) → Iterable< String> -
Compares two strings from
source
totarget
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited