Lines Matching refs:beginIndex

725      * specified <code>beginIndex</code> and extends to the
728 * <code>endIndex-beginIndex</code>. Unpaired surrogates within
731 * @param beginIndex the index to the first <code>char</code> of
738 * <code>beginIndex</code> is negative, or <code>endIndex</code>
740 * <code>beginIndex</code> is larger than <code>endIndex</code>.
743 public int codePointCount(int beginIndex, int endIndex) {
744 if (beginIndex < 0 || endIndex > value.length || beginIndex > endIndex) {
747 return Character.codePointCountImpl(value, beginIndex, endIndex - beginIndex);
1863 * @param beginIndex the beginning index, inclusive.
1866 * <code>beginIndex</code> is negative or larger than the
1869 public String substring(int beginIndex) {
1870 if (beginIndex < 0) {
1871 throw new StringIndexOutOfBoundsException(beginIndex);
1873 int subLen = value.length - beginIndex;
1877 return (beginIndex == 0) ? this : new String(value, beginIndex, subLen);
1882 * substring begins at the specified <code>beginIndex</code> and
1884 * Thus the length of the substring is <code>endIndex-beginIndex</code>.
1892 * @param beginIndex the beginning index, inclusive.
1896 * <code>beginIndex</code> is negative, or
1899 * <code>beginIndex</code> is larger than
1902 public String substring(int beginIndex, int endIndex) {
1903 if (beginIndex < 0) {
1904 throw new StringIndexOutOfBoundsException(beginIndex);
1909 int subLen = endIndex - beginIndex;
1913 return ((beginIndex == 0) && (endIndex == value.length)) ? this
1914 : new String(value, beginIndex, subLen);
1933 * @param beginIndex the begin index, inclusive.
1938 * if <tt>beginIndex</tt> or <tt>endIndex</tt> are negative,
1940 * or if <tt>beginIndex</tt> is greater than <tt>startIndex</tt>
1945 public CharSequence subSequence(int beginIndex, int endIndex) {
1946 return this.substring(beginIndex, endIndex);