@Internal public interface CharIndexTranslator
Modifier and Type | Method and Description |
---|---|
int |
getByteIndex(int charPos)
Calculates the byte index of the given char index.
|
int |
getCharIndex(int bytePos)
Deprecated.
This API were based on incorrect assumption that single byte
offset corresponds to single char offset
|
int |
getCharIndex(int bytePos,
int startCP)
Deprecated.
This API were based on incorrect assumption that single byte
offset corresponds to single char offset
|
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 position@Deprecated int getCharIndex(int bytePos)
bytePos
- The character offset to check@Deprecated int getCharIndex(int bytePos, int startCP)
bytePos
- The character offset to checkstartCP
- look from this characted 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 © 2005-2010 Potix Corporation. All Rights Reserved.