Lines Matching refs:fromIndex

1508      * object at an index no smaller than {@code fromIndex}, then
1513 * (this.charAt(<i>k</i>) == ch) {@code &&} (<i>k</i> &gt;= fromIndex)
1518 * (this.codePointAt(<i>k</i>) == ch) {@code &&} (<i>k</i> &gt;= fromIndex)
1521 * string at or after position {@code fromIndex}, then
1525 * There is no restriction on the value of {@code fromIndex}. If it
1535 * @param fromIndex the index to start the search from.
1538 * than or equal to {@code fromIndex}, or {@code -1}
1541 public int indexOf(int ch, int fromIndex) {
1543 if (fromIndex < 0) {
1544 fromIndex = 0;
1545 } else if (fromIndex >= max) {
1546 // Note: fromIndex might be near -1>>>1.
1553 for (int i = fromIndex; i < max; i++) {
1560 return indexOfSupplementary(ch, fromIndex);
1567 private int indexOfSupplementary(int ch, int fromIndex) {
1572 for (int i = fromIndex; i < max; i++) {
1615 * (this.charAt(<i>k</i>) == ch) {@code &&} (<i>k</i> &lt;= fromIndex)
1620 * (this.codePointAt(<i>k</i>) == ch) {@code &&} (<i>k</i> &lt;= fromIndex)
1623 * string at or before position {@code fromIndex}, then
1630 * @param fromIndex the index to start the search from. There is no
1631 * restriction on the value of {@code fromIndex}. If it is
1639 * than or equal to {@code fromIndex}, or {@code -1}
1642 public int lastIndexOf(int ch, int fromIndex) {
1646 int i = Math.min(fromIndex, length() - 1);
1654 return lastIndexOfSupplementary(ch, fromIndex);
1661 private int lastIndexOfSupplementary(int ch, int fromIndex) {
1665 int i = Math.min(fromIndex, length() - 2);
1699 * <i>k</i> &gt;= fromIndex {@code &&} this.startsWith(str, <i>k</i>)
1704 * @param fromIndex the index from which to start the search.
1709 public int indexOf(String str, int fromIndex) {
1711 return indexOf(this, str, fromIndex);
1721 * @param fromIndex the index to begin searching from.
1727 int fromIndex) {
1730 if (fromIndex >= sourceLength) {
1733 if (fromIndex < 0) {
1734 fromIndex = 0;
1737 return fromIndex;
1743 for (int i = fromIndex; i <= max; i++) {
1777 * @param fromIndex the index to begin searching from.
1781 int fromIndex) {
1782 if (fromIndex >= sourceCount) {
1785 if (fromIndex < 0) {
1786 fromIndex = 0;
1789 return fromIndex;
1795 for (int i = sourceOffset + fromIndex; i <= max; i++) {
1842 * <i>k</i> {@code <=} fromIndex {@code &&} this.startsWith(str, <i>k</i>)
1847 * @param fromIndex the index to start the search from.
1852 public int lastIndexOf(String str, int fromIndex) {
1854 return lastIndexOf(this, str, fromIndex);
1864 * @param fromIndex the index to begin searching from.
1870 int fromIndex) {
1878 if (fromIndex < 0) {
1881 if (fromIndex > rightIndex) {
1882 fromIndex = rightIndex;
1886 return fromIndex;
1892 int i = min + fromIndex;
1928 * @param fromIndex the index to begin searching from.
1932 int fromIndex) {
1938 if (fromIndex < 0) {
1941 if (fromIndex > rightIndex) {
1942 fromIndex = rightIndex;
1946 return fromIndex;
1952 int i = min + fromIndex;