string.codePointAt()

string.codePointAt() Returns the unicode value of the character present at the input position of the string.
Syntax
string.codePointAt(input)
input is an integer staring from 0 ( first position )

Here are some examples with output.
String my_str="Welcome to plus2net";
System.out.println(my_str.codePointAt(0)); // 87
System.out.println(my_str.codePointAt(3)); // 99
System.out.println(my_str.codePointAt(15)); // 50
Learn more about unicode values of the Chars here

What is the unicode vlaue of last char of the string ? Unicode vlaue of t is 116.
String my_str="Welcome to plus2net";
System.out.println(my_str.charAt(my_str.length()-1)); // t
System.out.println(my_str.codePointAt(my_str.length()-1)); // 116
System.out.println(my_str.codePointBefore(my_str.length())); // 116
All String functions


plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer