Re:You can't just assume UTF-8
by josephg on Tuesday April 30, 2024 @09:18AM
(#40210680)
JavaScript’s recently added implementation of String[Symbol.iterator] iterates through Unicode characters. So for example, [...str] will split any string into a list of Unicode scalar values.
Though you are right in that I don't know of a built-in way to count Unicode Scalar Values (USVs).