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

Unified Diff: pkg/analysis_services/lib/src/correction/strings.dart

Issue 418203002: Implement more fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments Created 6 years, 5 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
Index: pkg/analysis_services/lib/src/correction/strings.dart
diff --git a/pkg/analysis_services/lib/src/correction/strings.dart b/pkg/analysis_services/lib/src/correction/strings.dart
index 14887cc7395497f3bf2f0c5f354fe5f93896758c..02acad66346eeff450b3ddd02baa65d523bc849e 100644
--- a/pkg/analysis_services/lib/src/correction/strings.dart
+++ b/pkg/analysis_services/lib/src/correction/strings.dart
@@ -58,6 +58,19 @@ String removeStart(String str, String remove) {
return str;
}
+int compareStrings(String a, String b) {
+ if (a == b) {
+ return 0;
+ }
+ if (a == null) {
+ return 1;
+ }
+ if (b == null) {
+ return -1;
+ }
+ return a.compareTo(b);
+}
+
String repeat(String s, int n) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < n; i++) {
« no previous file with comments | « pkg/analysis_services/lib/src/correction/source_buffer.dart ('k') | pkg/analysis_services/lib/src/correction/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698