Example usage for java.lang Character codePointBefore

List of usage examples for java.lang Character codePointBefore

Introduction

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

Prototype

public static int codePointBefore(char[] a, int index, int start) 

Source Link

Document

Returns the code point preceding the given index of the char array, where only array elements with index greater than or equal to start can be used.

Usage

From source file:Main.java

public static void main(String[] args) {
    char[] c = new char[] { 'A', 'b', 'C', 'd' };

    int index = 3, start = 1;

    int res = Character.codePointBefore(c, index, start);

    String str = "Unicode code point is " + res;

    System.out.println(str);//from  www  .  ja va2  s  .co  m
}