string.codePointCount()

string.codePointCount() Returns the number of unicodes present within a range ( start and end value ) inside a string.
Syntax
string.codePointCount(input_start, input_end)
Inputs are integers showing staring and ending of range. (

Here are some examples with output.
String my_str="Welcome to plus2net";
System.out.println(my_str.codePointCount(0,10)); // 10
Learn more about unicode values of the Chars here

Total number of unicode chars present in a string.
String my_str="Welcome to plus2net";
System.out.println(my_str.codePointCount(0,my_str.length())); // 19
System.out.println(my_str.length()); // 19
All String functions

Subscribe

* indicates required
Subscribe to plus2net

    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-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer