diff_text2 method

String diff_text2(
  1. List<Diff> diffs
)

Compute and return the destination text (all equalities and insertions). diffs is a List of Diff objects. Returns the destination text.

Implementation

String diff_text2(List<Diff> diffs) {
  final text = StringBuffer();
  for (Diff aDiff in diffs) {
    if (aDiff.operation != Operation.delete) {
      text.write(aDiff.text);
    }
  }
  return text.toString();
}