Các pro giải thích dùm em cái offsetByCodePoints này với
VD:
public class StringDemo {

public static void main(String[] args) {

String str = "aacdefaa";
System.out.println("string = " + str);

// returns the index within this String
int retval = str.offsetByCodePoints(2, 4);
// prints the index
System.out.println("index = " + retval);
}
}

Kết quả là
string = aacdefaa
index = 6