fn len_of_first_n_code_units(
text: &DOMString,
n: Utf16CodeUnitLength,
) -> Utf8CodeUnitLengthExpand description
The length in bytes of the first n code units in a string when encoded in UTF-16.
If the string is fewer than n code units, returns the length of the whole string.