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.

Inheritance

Constructors

ContextDiffer({int context = 3})

Properties

context int
The number of unchanged lines shown above and blow a change.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareLines(Iterable<String> source, Iterable<String> target, {String? sourceLabel, String? targetLabel}) Iterable<String>
Compares two iterables of lines from source to target.
override
compareStrings(String source, String target, {String? sourceLabel, String? targetLabel}) Iterable<String>
Compares two strings from source to target.
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