java.lang.Character.offsetByCodePoints(CharSequence seq, int index, int codePointOffset)


java.lang.Character.offsetByCodePoints(CharSequence seq, int index, int codePointOffset)

package com.codingdict;



import java.lang.*;



public class CharacterDemo {



   public static void main(String[] args) {



      // create a CharSequence seq and assign value

      CharSequence seq = "Hello World";



      // create an int primitive res

      int res;



      // assign result of offsetByCodePoints on seq to res

      res = Character.offsetByCodePoints(seq, 3, 8);



      String str = "The index within the char sequence seq is " + res;



      // print res value

      System.out.println( str );

   }

}