--- a/jdk/src/share/classes/java/lang/String.java Thu Nov 29 14:07:47 2012 -0800
+++ b/jdk/src/share/classes/java/lang/String.java Thu Nov 29 14:09:45 2012 -0800
@@ -1706,6 +1706,24 @@
}
/**
+ * Code shared by String and AbstractStringBuilder to do searches. The
+ * source is the character array being searched, and the target
+ * is the string being searched for.
+ *
+ * @param source the characters being searched.
+ * @param sourceOffset offset of the source string.
+ * @param sourceCount count of the source string.
+ * @param target the characters being searched for.
+ * @param fromIndex the index to begin searching from.
+ */
+ static int indexOf(char[] source, int sourceOffset, int sourceCount,
+ String target, int fromIndex) {
+ return indexOf(source, sourceOffset, sourceCount,
+ target.value, 0, target.value.length,
+ fromIndex);
+ }
+
+ /**
* Code shared by String and StringBuffer to do searches. The
* source is the character array being searched, and the target
* is the string being searched for.
@@ -1797,6 +1815,24 @@
}
/**
+ * Code shared by String and AbstractStringBuilder to do searches. The
+ * source is the character array being searched, and the target
+ * is the string being searched for.
+ *
+ * @param source the characters being searched.
+ * @param sourceOffset offset of the source string.
+ * @param sourceCount count of the source string.
+ * @param target the characters being searched for.
+ * @param fromIndex the index to begin searching from.
+ */
+ static int lastIndexOf(char[] source, int sourceOffset, int sourceCount,
+ String target, int fromIndex) {
+ return lastIndexOf(source, sourceOffset, sourceCount,
+ target.value, 0, target.value.length,
+ fromIndex);
+ }
+
+ /**
* Code shared by String and StringBuffer to do searches. The
* source is the character array being searched, and the target
* is the string being searched for.