/** * Returns the character at the specified offset in this string. * * @param index * the zero-based index in this string. * @return the character at the index. * @throws IndexOutOfBoundsException * if {@code index < 0} or {@code index >= length()}. */ public char charAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return value[offset + index]; }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns a string containing a suffix of this string. The returned string * shares this string's <a href="#backing_array">backing array</a>. * * @param start * the offset of the first character. * @return a new string containing the characters from start to the end of * the string. * @throws IndexOutOfBoundsException * if {@code start < 0} or {@code start > length()}. */ public String substring(int start) { if (start == 0) { return this; } if (start >= 0 && start <= count) { return new String(offset + start, count - start, value); } throw indexAndLength(start); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }
/** * Returns the character at the specified offset in this string. * * @param index * the zero-based index in this string. * @return the character at the index. * @throws IndexOutOfBoundsException * if {@code index < 0} or {@code index >= length()}. */ public char charAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return value[offset + index]; }
/** * Returns the character at the specified offset in this string. * * @param index * the zero-based index in this string. * @return the character at the index. * @throws IndexOutOfBoundsException * if {@code index < 0} or {@code index >= length()}. */ public char charAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return value[offset + index]; }
/** * Returns the character at the specified offset in this string. * * @param index * the zero-based index in this string. * @return the character at the index. * @throws IndexOutOfBoundsException * if {@code index < 0} or {@code index >= length()}. */ public char charAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return value[offset + index]; }
/** * Returns the character at the specified offset in this string. * * @param index * the zero-based index in this string. * @return the character at the index. * @throws IndexOutOfBoundsException * if {@code index < 0} or {@code index >= length()}. */ public char charAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return value[offset + index]; }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns the Unicode code point at the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()} * @see Character#codePointAt(char[], int, int) * @since 1.5 */ public int codePointAt(int index) { if (index < 0 || index >= count) { throw indexAndLength(index); } return Character.codePointAt(value, offset + index, offset + count); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }
/** * Returns the Unicode code point that precedes the given {@code index}. * * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()} * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore(int index) { if (index < 1 || index > count) { throw indexAndLength(index); } return Character.codePointBefore(value, offset + index, offset); }