Lines Matching defs:index

150      * index <i>k</i> less than <code>newLength</code>, the character at
151 * index <i>k</i> in the new character sequence is the same as the
152 * character at index <i>k</i> in the old sequence if <i>k</i> is less
185 * Returns the <code>char</code> value in this sequence at the specified index.
186 * The first <code>char</code> value is at index <code>0</code>, the next at index
189 * The index argument must be greater than or equal to
192 * <p>If the <code>char</code> value specified by the index is a
196 * @param index the index of the desired <code>char</code> value.
197 * @return the <code>char</code> value at the specified index.
198 * @throws IndexOutOfBoundsException if <code>index</code> is
201 public char charAt(int index) {
202 if ((index < 0) || (index >= count))
203 throw new StringIndexOutOfBoundsException(index);
204 return value[index];
209 * index. The index refers to <code>char</code> values
213 * <p> If the <code>char</code> value specified at the given index
214 * is in the high-surrogate range, the following index is less
216 * <code>char</code> value at the following index is in the
219 * the <code>char</code> value at the given index is returned.
221 * @param index the index to the <code>char</code> values
223 * <code>index</code>
224 * @exception IndexOutOfBoundsException if the <code>index</code>
228 public int codePointAt(int index) {
229 if ((index < 0) || (index >= count)) {
230 throw new StringIndexOutOfBoundsException(index);
232 return Character.codePointAt(value, index);
237 * index. The index refers to <code>char</code> values
241 * <p> If the <code>char</code> value at <code>(index - 1)</code>
242 * is in the low-surrogate range, <code>(index - 2)</code> is not
243 * negative, and the <code>char</code> value at <code>(index -
246 * returned. If the <code>char</code> value at <code>index -
250 * @param index the index following the code point that should be returned
251 * @return the Unicode code point value before the given index.
252 * @exception IndexOutOfBoundsException if the <code>index</code>
256 public int codePointBefore(int index) {
257 int i = index - 1;
259 throw new StringIndexOutOfBoundsException(index);
261 return Character.codePointBefore(value, index);
268 * index <code>endIndex - 1</code>. Thus the length (in
273 * @param beginIndex the index to the first <code>char</code> of
275 * @param endIndex the index after the last <code>char</code> of
292 * Returns the index within this sequence that is offset from the
293 * given <code>index</code> by <code>codePointOffset</code> code
295 * <code>index</code> and <code>codePointOffset</code> count as
298 * @param index the index to be offset
300 * @return the index within this sequence
301 * @exception IndexOutOfBoundsException if <code>index</code>
304 * starting with <code>index</code> has fewer than
307 * before <code>index</code> has fewer than the absolute value of
310 public int offsetByCodePoints(int index, int codePointOffset) {
311 if (index < 0 || index > count) {
315 index, codePointOffset);
321 * be copied is at index <code>srcBegin</code>; the last character to
322 * be copied is at index <code>srcEnd-1</code>. The total number of
325 * at index <code>dstBegin</code> and ending at index:
360 * The character at the specified index is set to <code>ch</code>. This
363 * character <code>ch</code> at position <code>index</code>.
365 * The index argument must be greater than or equal to
368 * @param index the index of the character to modify.
370 * @throws IndexOutOfBoundsException if <code>index</code> is
373 public void setCharAt(int index, char ch) {
374 if ((index < 0) || (index >= count))
375 throw new StringIndexOutOfBoundsException(index);
376 value[index] = ch;
404 * index <i>k</i> in the new character sequence is equal to the character
405 * at index <i>k</i> in the old character sequence, if <i>k</i> is less
406 * than <i>n</i>; otherwise, it is equal to the character at index
448 * index {@code start}, are appended, in order, to the contents of
449 * this sequence up to the (exclusive) index {@code end}. The length
454 * index <i>k</i> in this character sequence becomes equal to the
455 * character at index <i>k</i> in this sequence, if <i>k</i> is less than
456 * <i>n</i>; otherwise, it is equal to the character at index
464 * @param start the starting index of the subsequence to be appended.
465 * @param end the end index of the subsequence to be appended.
516 * index {@code offset}, are appended, in order, to the contents
526 * @param offset the index of the first {@code char} to append.
681 * the character at index {@code end - 1} or to the end of the
685 * @param start The beginning index, inclusive.
686 * @param end The ending index, exclusive.
747 * <p>Note: If the character at the given index is a supplementary
751 * <code>Character.charCount(thisSequence.codePointAt(index))</code>,
754 * @param index Index of <code>char</code> to remove
756 * @throws StringIndexOutOfBoundsException if the <code>index</code>
760 public AbstractStringBuilder deleteCharAt(int index) {
761 if ((index < 0) || (index >= count))
762 throw new StringIndexOutOfBoundsException(index);
763 System.arraycopy(value, index+1, value, index, count-index-1);
772 * at index <code>end - 1</code> or to the end of the
779 * @param start The beginning index, inclusive.
780 * @param end The ending index, exclusive.
810 * substring begins at the specified index and extends to the end of
813 * @param start The beginning index, inclusive.
838 * @param start the start index, inclusive.
839 * @param end the end index, exclusive.
856 * extends to the character at index <code>end - 1</code>.
858 * @param start The beginning index, inclusive.
859 * @param end The ending index, exclusive.
881 * the position indicated by {@code index}. The length of this
884 * @param index position at which to insert subarray.
886 * @param offset the index of the first {@code char} in subarray to
891 * @throws StringIndexOutOfBoundsException if {@code index}
897 public AbstractStringBuilder insert(int index, char[] str, int offset,
900 if ((index < 0) || (index > length()))
901 throw new StringIndexOutOfBoundsException(index);
907 System.arraycopy(value, index, value, index + len, count - index);
908 System.arraycopy(str, offset, value, index, len);
946 * The character at index <i>k</i> in the new character sequence is
949 * <li>the character at index <i>k</i> in the old character sequence, if
951 * <li>the character at index <i>k</i>{@code -offset} in the
954 * <li>the character at index <i>k</i>{@code -str.length()} in the
1054 * The character at index <i>k</i> in this sequence becomes equal to:
1056 * <li>the character at index <i>k</i> in this sequence, if
1058 * <li>the character at index <i>k</i>{@code +start-dstOffset} in
1061 * <li>the character at index <i>k</i>{@code -(end-start)} in this
1079 * @param start the starting index of the subsequence to be inserted.
1080 * @param end the end index of the subsequence to be inserted.
1251 * Returns the index within this string of the first occurrence of the
1261 * object, then the index of the first character of the first
1272 * Returns the index within this string of the first occurrence of the
1273 * specified substring, starting at the specified index. The integer
1282 * @param fromIndex the index from which to start the search.
1283 * @return the index within this string of the first occurrence of the
1284 * specified substring, starting at the specified index.
1294 * Returns the index within this string of the rightmost occurrence
1296 * considered to occur at the index value <code>this.length()</code>.
1297 * The returned index is the largest value <i>k</i> such that
1305 * within this object, then the index of the first character of
1316 * Returns the index within this string of the last occurrence of the
1326 * @param fromIndex the index to start the search from.
1327 * @return the index within this sequence of the last occurrence of the
1347 * character at index <i>k</i> in the new character sequence is
1348 * equal to the character at index <i>n-k-1</i> in the old