Example usage for java.lang Character offsetByCodePoints

List of usage examples for java.lang Character offsetByCodePoints

Introduction

In this page you can find the example usage for java.lang Character offsetByCodePoints.

Prototype

public static int offsetByCodePoints(CharSequence seq, int index, int codePointOffset) 

Source Link

Document

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.

Usage

From source file:Main.java

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);//from  w ww .  j a va 2  s . c  om
}