src/share/classes/java/lang/AbstractStringBuilder.java

Print this page

        

*** 1305,1315 **** /** * Returns the index within this string of the first occurrence of the * specified substring, starting at the specified index. The integer * returned is the smallest value {@code k} for which: * <blockquote><pre> ! * k >= Math.min(fromIndex, str.length()) && * this.toString().startsWith(str, k) * </pre></blockquote> * If no such value of <i>k</i> exists, then -1 is returned. * * @param str the substring for which to search. --- 1305,1315 ---- /** * Returns the index within this string of the first occurrence of the * specified substring, starting at the specified index. The integer * returned is the smallest value {@code k} for which: * <blockquote><pre> ! * k >= Math.min(fromIndex, this.length()) && * this.toString().startsWith(str, k) * </pre></blockquote> * If no such value of <i>k</i> exists, then -1 is returned. * * @param str the substring for which to search.
*** 1344,1354 **** /** * Returns the index within this string of the last occurrence of the * specified substring. The integer returned is the largest value <i>k</i> * such that: * <blockquote><pre> ! * k <= Math.min(fromIndex, str.length()) && * this.toString().startsWith(str, k) * </pre></blockquote> * If no such value of <i>k</i> exists, then -1 is returned. * * @param str the substring to search for. --- 1344,1354 ---- /** * Returns the index within this string of the last occurrence of the * specified substring. The integer returned is the largest value <i>k</i> * such that: * <blockquote><pre> ! * k <= Math.min(fromIndex, this.length()) && * this.toString().startsWith(str, k) * </pre></blockquote> * If no such value of <i>k</i> exists, then -1 is returned. * * @param str the substring to search for.