Symbols and SymbolAt

# Dimitrian Nine (5 years ago)

Maybe i don't know something, but want to proposal idea: We have emojis and other symbols, that have many codepoints

And 'emoji'.length > 1

My idea that we have something like: 'emoji'.symbols - and get array of symbols, where symbol is array of codepoints

And maybe method SymbolAt 'emoji'.SymobolAt(0) = array of codepoints

Examples:

'123456emoji789'.symbols.length = 10

'123456emoji789'.SymbolAt(6) = codepoints of emoji

PS: and for textarea maybe something like text.symbolSelectionStart|End

# Jordan Harband (5 years ago)

There's already .codePointAt, and [...str].length.

The thing that's really needed more than code points is grapheme clusters; see esdiscuss.org/topic/working

# Dimitrian Nine (5 years ago)

Thanks i found same ideas here:

esdiscuss.org/topic/string-prototype-symbolat-improved-string-prototype-charat, esdiscuss.org/topic/working-with-grapheme-clusters

But topics was created - 6 years ago... And no news for working on it?

# 森建 (5 years ago)