I know there is String#length
and the various methods in Character
which more or less work on code units/code points.
What is the suggested
String.length()
does not return the size of the array backing the string, but the actual length of the string, defined as "the number of Unicode code units in the string." (see API docs).
(As pointed out by Stephen C in the comments, Unicode code units == Java chars)
If this is not what you are looking for, then perhaps you should elaborate the question a bit more.