2013年12月28日土曜日

Count up letters, bytes in UTF-8 and surrogate pairs in JavaScript

Below is a sample code in JavaScript to count up letters, bytes in UTF-8 and surrogate pairs. Available as a gist.



0 letter(s).
0 byte(s) in UTF-8.
0 surrogate pair(s).