3 ms·
The JavaScript language forces utf16 (whether or not v8 uses that representation under the hood). For instance if you want to substring the indexes you pass are
by MobiusHorizons 3y ago
The JavaScript language forces utf16 (whether or not v8 uses that representation under the hood). For instance if you want to substring the indexes you pass are for utf16 codepoints
- lmm 3y agoSure, but arguing that that's a good reason for length to count utf16 is purely circular.