/** Retrieves the Unicode code point value that precedes the {@code index}. * * @param index the index to the {@code char} code unit within this object. * @return the Unicode code point value. * @throws IndexOutOfBoundsException if {@code index} is less than 1 or greater than {@link #length()}. * @see Character * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore (int index) { if (index < 1 || index > length) { throw new StringIndexOutOfBoundsException(index); } return Character.codePointBefore(chars, index); }
/** Retrieves the Unicode code point value that precedes the {@code index}. * * @param index the index to the {@code char} code unit within this object. * @return the Unicode code point value. * @throws IndexOutOfBoundsException if {@code index} is less than 1 or greater than {@link #length()}. * @see Character * @see Character#codePointBefore(char[], int, int) * @since 1.5 */ public int codePointBefore (int index) { if (index < 1 || index > length) { throw new StringIndexOutOfBoundsException(index); } return Character.codePointBefore(chars, index); }
public int peekPrev() throws NoSuchElementException { if (! hasPrev()) throw new NoSuchElementException(); return Character.codePointBefore(chars, offs + idx); }
public int peekPrevious() throws NoSuchElementException { if (! hasPrevious()) throw new NoSuchElementException(); return Character.codePointBefore(chars, offs + idx); }
/** * 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); }
/** * Retrieves the Unicode code point value that precedes the {@code index}. * * @param index * the index to the {@code char} code unit within this object. * @return the Unicode code point value. * @throws IndexOutOfBoundsException * if {@code index} is less than 1 or greater than * {@link #length()}. * @see Character * @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, index); }
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + ZZ_CMAP(zzInput) ];
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ];
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ];
@Override int context(int pos) { pos += start; int r1 = pos > start && pos <= end ? Character.codePointBefore(str, pos) : -1; int r2 = pos < end ? Character.codePointAt(str, pos) : -1; return Utils.emptyOpContext(r1, r2); }
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ];
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ];
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + ZZ_CMAP(zzInput) ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + ZZ_CMAP(zzInput) ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + ZZ_CMAP(zzInput) ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + ZZ_CMAP(zzInput) ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos/*, zzStartRead*/); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + ZZ_CMAP(zzInput) ];
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ];
zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ]; zzFPos = zzMarkedPos; while (!zzFinL[zzFPos] || (zzAttrL[zzFState] & 1) != 1) { zzInput = Character.codePointBefore(zzBufferL, zzFPos, zzStartRead); zzFPos -= Character.charCount(zzInput); zzFState = zzTransL[ zzRowMapL[zzFState] + zzCMapL[zzInput] ];
@Override public int previousCodePoint() { if(pos == 0) { return Collation.SENTINEL_CP; } int c = Character.codePointBefore(s, pos); pos -= Character.charCount(c); return c; }
public int getCodePointBeforeCursor() { final int length = mCommittedTextBeforeComposingText.length(); if (length < 1) return Constants.NOT_A_CODE; return Character.codePointBefore(mCommittedTextBeforeComposingText, length); }
private int indexOfLastDigit(final int start, final int end) { int offset = end; while (offset > start) { final int codePoint = Character.codePointBefore(this, offset); offset -= Character.charCount(codePoint); if (Character.isDigit(codePoint)) { return offset; } } return -1; } }
/** * 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); }