Symbols and SymbolAt

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Symbols and SymbolAt

Dimitrian Nine
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

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Symbols and SymbolAt

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

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

On Sun, Sep 8, 2019 at 5:01 AM Dimitrian Nine <[hidden email]> wrote:
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
_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Symbols and SymbolAt

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

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Symbols and SymbolAt

森建
2019年9月9日 1:25 +0900、Dimitrian Nine <[hidden email]> のメール:
But topics was created - 6 years ago... And no news for working on it?
_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss