How to returns the index within a char subarray that is offset from the given index by codePointOffset in Java

1 Answer

0 votes
package javaapplication1;
 
public class JavaApplication1 {
 
    public static void main(String[] args) {
 
        String s = "abcdefghijk";

        int rv = s.offsetByCodePoints(3, 5);
        System.out.println(rv);
    }
}
 
/*
run:

8
 
*/

 



answered Sep 16, 2016 by avibootz
...