Here you can find the source of convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset)
Parameter | Description |
---|---|
inputStr | a parameter |
charOffset | a parameter |
public static int convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset)
//package com.java2s; public class Main { /**/*from ww w. ja va 2s. c om*/ * Computes the code point offset for the specified character offset in the * input string * * @param inputStr * @param charOffset * @return */ public static int convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset) { return Character.codePointCount(inputStr, 0, charOffset); } }