Java Coding: How To Find Number of Characters in a String (!= String.length())

Java Coding: How To Find Number of Characters in a String (!= String.length())

Note: This article will be emailed to your friend.

Length of string can be interpreted variously -

number of chars in the string
number of characters in the string
number of bytes in the string

String.length() gives you the number of chars in the string accurately.
However a char is not necessarily a complete character. Why?
Supplementary characters exist in the Unicode charset. These are characters that have [...]

Read the rest of this article (266 words)

Please fill in the following fields

* - Required

Your Name: *

Your E-Mail: *

Your Remarks:

Friend's Name: *

Friend's E-Mail: *

Protected by Comment Guard Pro