@Internal public interface CharIndexTranslator
| Modifier and Type | Method and Description |
|---|---|
int |
getByteIndex(int charPos)
Calculates the byte index of the given char index.
|
int[][] |
getCharIndexRanges(int startBytePosInclusive,
int endBytePosExclusive)
Finds character ranges that includes specified byte range.
|
boolean |
isIndexInTable(int bytePos)
Check if index is in table
|
int |
lookIndexBackward(int bytePos)
Return last index <= bytePos that is in table
|
int |
lookIndexForward(int bytePos)
Return first index >= bytePos that is in table
|
int getByteIndex(int charPos)
charPos - The char positionint[][] getCharIndexRanges(int startBytePosInclusive,
int endBytePosExclusive)
startBytePosInclusive - start byte rangeendBytePosExclusive - end byte rangeboolean isIndexInTable(int bytePos)
bytePos - int lookIndexForward(int bytePos)
bytePos - int lookIndexBackward(int bytePos)
bytePos - Copyright 2021 The Apache Software Foundation or its licensors, as applicable.