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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/java_core.dart

Issue 17009007: Tweak j2d for String.indexOf(s,int) semantics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/analyzer_experimental/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/java_core.dart b/pkg/analyzer_experimental/lib/src/generated/java_core.dart
index 7e9024549251faa0749bd6e592c64112af5582ff..01ffd5d3315059e322a052a4f7057a83f33aec5f 100644
--- a/pkg/analyzer_experimental/lib/src/generated/java_core.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/java_core.dart
@@ -154,6 +154,16 @@ class JavaString {
}
});
}
+ static int indexOf(String target, String str, int fromIndex) {
+ if (fromIndex > target.length) return -1;
+ if (fromIndex < 0) fromIndex = 0;
+ return target.indexOf(str, fromIndex);
+ }
+ static int lastIndexOf(String target, String str, int fromIndex) {
+ if (fromIndex > target.length) return -1;
+ if (fromIndex < 0) fromIndex = 0;
+ return target.lastIndexOf(str, fromIndex);
+ }
static bool startsWithBefore(String s, String other, int start) {
return s.indexOf(other, start) != -1;
}

Powered by Google App Engine
This is Rietveld 408576698