Count characters in a string, with special processing to account for astral symbols in UCS-2, matching the behaviour of HTML-native maxlength. See:
Count characters in a string, with special processing to account for astral symbols in UCS-2, matching the behaviour of HTML-native maxlength. See: