Lines Matching refs:end

151     final void append0(CharSequence s, int start, int end) {
155 if ((start | end) < 0 || start > end || end > s.length()) {
159 int length = end - start;
169 ((String) s)._getChars(start, end, value, count);
175 for (int i = start; i < end; i++) {
215 private StringIndexOutOfBoundsException startEndAndLength(int start, int end) {
216 throw new StringIndexOutOfBoundsException(count, start, end - start);
219 final void delete0(int start, int end) {
221 if (end > count) {
222 end = count;
224 if (end == start) {
227 if (end > start) {
228 int length = count - end;
231 System.arraycopy(value, end, value, start, length);
235 System.arraycopy(value, end, newData, start, length);
240 count -= end - start;
244 throw startEndAndLength(start, end);
291 * @param end
292 * the exclusive end index of the characters to copy.
299 * negative, the {@code start} is greater than {@code end}, the
300 * {@code end} is greater than the current {@link #length()} or
301 * {@code dstStart + end - begin} is greater than
304 public void getChars(int start, int end, char[] dst, int dstStart) {
305 if (start > count || end > count || start > end) {
306 throw startEndAndLength(start, end);
308 System.arraycopy(value, start, dst, dstStart, end - start);
365 final void insert0(int index, CharSequence s, int start, int end) {
369 if ((index | start | end) < 0 || index > count || start > end || end > s.length()) {
372 insert0(index, s.subSequence(start, end).toString());
405 final void replace0(int start, int end, String string) {
407 if (end > count) {
408 end = count;
410 if (end > start) {
412 int diff = end - start - stringLength;
416 System.arraycopy(value, end, value, start
417 + stringLength, count - end);
422 System.arraycopy(value, end, newData, start
423 + stringLength, count - end);
429 move(-diff, end);
438 if (start == end) {
446 throw startEndAndLength(start, end);
454 int end = count - 1;
456 char endLow = value[end];
458 for (int i = 0, mid = count / 2; i < mid; i++, --end) {
460 char endHigh = value[end - 1];
474 value[end] = frontLow;
475 value[end - 1] = frontHigh;
479 endLow = value[end - 2];
481 end--;
484 value[end] = frontHigh;
492 value[end] = frontLow;
497 // surrogate only at the end
498 value[end] = frontHigh;
506 value[end] = allowFrontSur ? endLow : frontHigh;
510 for (int i = 0, end = count; i < count; i++) {
515 newData[--end] = low;
519 newData[--end] = high;
550 * the current length, then the new characters at the end of this object
582 * to the current end.
605 * to the {@code end} index.
609 * @param end
610 * the exclusive end index to end the subsequence.
613 * if {@code start} is negative, greater than {@code end} or if
614 * {@code end} is greater than the current {@link #length()}.
616 public String substring(int start, int end) {
617 if (start >= 0 && start <= end && end <= count) {
618 if (start == end) {
623 return new String(value, start, end - start);
625 throw startEndAndLength(start, end);
650 * index to the {@code end} index.
654 * @param end
655 * the exclusive end index to end the subsequence.
658 * if {@code start} is negative, greater than {@code end} or if
659 * {@code end} is greater than the current {@link #length()}.
662 public CharSequence subSequence(int start, int end) {
663 return substring(start, end);
668 * the character starts at the beginning and moves towards the end.
683 * character starts at the specified offset and moves towards the end.
732 * the character starts at the end and moves towards the beginning.
857 * and {@code end}.
861 * @param end
862 * the exclusive end index of the subsequence.
866 * {@code end} or {@code end} is greater than
872 public int codePointCount(int start, int end) {
873 if (start < 0 || end > count || start > end) {
874 throw startEndAndLength(start, end);
876 return Character.codePointCount(value, start, end - start);