Possible Duplicate:
Java: length of string when using unicode overline to display square roots?
How do I get number of Unicode characters in a String?
Given a char[]
of Thai characters:
[อ, ภ, ิ, ช, า, ต, ิ]
This comes out in String as: อภิชาติ
String.length()
returns 7. I understand there are (technically) 7 characters, but I need a method that would return me 5. That is the exact number of character spaces represented on screen.