The utf library's stringToCharCodes should avoid extra allocation for BMP-strings. #6553
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-obsolete
Closed as the reported issue is no longer relevant
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
If a string contains no surrogates (i.e., it's entirely in the BMP), the result of stringToCharCodes(string) is the same as string,charCodes
(where charCodes should probably be renamed to codeUnits with the 16-bit strings).
The function should recognize this and simply return a thin unmodifiable List wrapper around the String.
The text was updated successfully, but these errors were encountered: