`String.prototype.symbolAt()` (improved `String.prototype.charAt()`)
C. Scott Ananian
ecmascript at cscott.net
Fri Feb 14 02:14:15 PST 2014
Note that `Array.from(str)` and `str[Symbol.iterator]` overlap
significantly. In particular, it's somewhat awkward to iterate over
code points using `String#symbolAt`; it's much easier to use
`substr()` and then use the StringIterator.
ps. I see that Domenic has said something similar.
On Thu, Feb 13, 2014 at 11:34 PM, Mathias Bynens <mathias at qiwi.be> wrote:
> Allen mentioned that `String#at` might not make it to ES6 because nobody in TC39 is championing it. I’ve now asked Rick if he would be the champion for this, and he agreed. (Thanks again!)
> Looking over the ‘TC39 progress’ document at <https://docs.google.com/a/chromium.org/document/d/1QbEE0BsO4lvl7NFTn5WXWeiEIBfaVUF7Dk0hpPpPDzU>, it seems most of the work is already taken care of: the use case was discussed in this thread, the proposal has a complete spec text, and there’s an example implementation/polyfill with unit tests. See <http://mths.be/at>.
> Is there anything else I can do to help get this included as a non-TC39-member?
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss