Incorrect length for some emojis
See original GitHub issueHi there, the library returns incorrect length:
len("❤️"); // 2
len("👊🏽"); // 2
I don’t seem to be able to find a solution for this in ANY library except lodash which has a complicated regex…
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Wrong length of emoji #2552 - facebook/draft-js - GitHub
Wrong length for some of emojis So, the length of emojis are: 😀 - has length 1. 🏖️ - has length 2. ❤️...
Read more >Only 2 emoji return an incorrect length when compared ...
With only 2 face emojis - the "smiling face" emoji and "frowning face" emoji, the range comes back as a length of 1....
Read more >It's not wrong that "🤦🏼♂️".length == 7 - Henri Sivonen
length of a string containing an emoji results in a number greater than 1 (typically 2) and then proceeds to the conclusion that...
Read more >Emoji Line Height Incorrect - Scriptable - Automators Talk
The problem is that for some reason the line height of the emoji is not quite the same as the rest of the...
Read more >20 Emojis You've Been Using Wrong | SELF
Time to get schooled on practicing grammatically correct emoji usage with the help of Unicode's* very* extensive dictionary.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed this problem in my own library using a regex borrowed from lodash… https://github.com/sallar/stringz
I understand, yet terminology conundrum is still here, it’s not string length, it’s code point count