How can I get the real length of Japanese string?
For example, the length()
function would return the bytes length, not the actual length.
s = "";
alert(s.length); // '2'
Is there any way to get the real length which is in this case 1?
How can I get the real length of Japanese string?
For example, the length()
function would return the bytes length, not the actual length.
s = "";
alert(s.length); // '2'
Is there any way to get the real length which is in this case 1?