Java tutorial
public class Main { public static void main(String[] args) { CharSequence seq = "Hello World"; int res = Character.offsetByCodePoints(seq, 3, 8); String str = "The index within the char sequence seq is " + res; System.out.println(str); } }