Calculates the actual UTF-8 byte length of a string This is critical because JavaScript's .length returns character count, not byte count
The string to measure
The number of bytes when encoded as UTF-8
Calculates the actual UTF-8 byte length of a string This is critical because JavaScript's .length returns character count, not byte count