Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1079)

Unified Diff: pkg/analysis_server/lib/src/services/correction/diff.dart

Issue 626883003: Fix for the prefix/suffix diff computing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/sort_members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/diff.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/diff.dart b/pkg/analysis_server/lib/src/services/correction/diff.dart
deleted file mode 100644
index c10deb06bce8273682ccf27efa254b8c5491c57d..0000000000000000000000000000000000000000
--- a/pkg/analysis_server/lib/src/services/correction/diff.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library diff;
-
-import 'dart:math';
-
-
-/**
- * Return the number of characters common to the start of [a] and [b].
- */
-int findCommonPrefix(String a, String b) {
- int n = min(a.length, b.length);
- for (int i = 0; i < n; i++) {
- if (a.codeUnitAt(i) != b.codeUnitAt(i)) {
- return i;
- }
- }
- return n;
-}
-
-
-/**
- * Return the number of characters common to the end of [a] and [b].
- */
-int findCommonSuffix(String a, String b) {
- int a_length = a.length;
- int b_length = b.length;
- int n = min(a_length, b_length);
- for (int i = 1; i <= n; i++) {
- if (a.codeUnitAt(a_length - i) != b.codeUnitAt(b_length - i)) {
- return i - 1;
- }
- }
- return n;
-}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/sort_members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698