getByteLengthOfString(s, b, i, c) { for (b = i = 0; c = s.charCodeAt(i++); b += c >> 11 ? 3 : c >> 7 ? 2 : 1); return b; } let bytesize=getByteLengthOfString("가나다라마바사,ABCD");