Skip to content

Wrong length returned for some Emojis #1

@sallar

Description

@sallar

Hi there,

I noticed that the library is returning the wrong length for some emojis:

utils.length("❤️"); // Returns 2
utils.length("💪🏼"); // Returns 2 because it has a "color" overlay (compared to 💪 which is 1)
utils.substring("👦🏻", 0, 1); // Returns 👦!

I wish I could fix it myself, but I’m a bit of noob when it comes to unicode strings...
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions