Expect to have a property or method to get the number of characters in the string #1630
Labels
feature suggestion
Please see https://github.com/tc39/ecma262/blob/HEAD/CONTRIBUTING.md#creating-a-new-proposal
String.prototype.length
This property returns the number of code units in the string. UTF-16, the string format used by JavaScript, uses a single 16-bit code unit to represent the most common characters, but needs to use two code units for less commonly-used characters, so it's possible for the value returned by length to not match the actual number of characters in the string.
MDN-String.prototype.length
It is expected that there is a way to return the format of a character in a string instead of the number of UTF-16 coding units.
The text was updated successfully, but these errors were encountered: