String Character Length: Difference between revisions
Content deleted Content added
Line 176:
Since Java 1.5, the actual number of characters can be determined by calling the codePointCount method.
String str = "\uD834\uDD2A"; //U+1D12A
int length = str.codePointCount(0, str.length);▼
int length1 = str.length(); //2
==[[JavaScript]]==
|