charAt
char charAt(int index)
Returns the char value at the specified index.
codePointAt
int codePointAt(int index)
Returns the character (Unicode code point) at the specified index.
offsetByCodePoints
offsetByCodePoints
public int offsetByCodePoints(int index,
int codePointOffset)
返回此 String 中从给定的 index 处偏移 codePointOffset 个代码点的索引。文本范围内由 index 和 codePointOffset 给定的未配对代理项各计为一个代码点。
参数:
index - 要偏移的索引
codePointOffset - 代码点中的偏移量
返回:
String 的索引