Closed tbuz closed 2 years ago
I'd say it is the intended behavior
There is emoji_lis()
which returns all emoji in a string:
print(emoji.emoji_lis("🚀🚀🚀"))
# [{'location': 0, 'emoji': '🚀'}, {'location': 1, 'emoji': '🚀'}, {'location': 2, 'emoji': '🚀'}]
# note that emoji can span multiple chars:
print(emoji.emoji_lis("👨🎤🚀🚀"))
# [{'location': 0, 'emoji': '👨🎤'}, {'location': 3, 'emoji': '🚀'}, {'location': 4, 'emoji': '🚀'}]
# in version 1.7.0 there is also:
print(emoji.emoji_list("👨🎤🚀🚀"))
# [{'match_start': 0, 'match_end': 3, 'emoji': '👨🎤'}, {'match_start': 3, 'match_end': 4, 'emoji': '🚀'}, {'match_start': 4, 'match_end': 5, 'emoji': '🚀'}]
Currently, emoji.is_emoji() does not return True when the input contains multiple emojis without spaces in between, e.g.
Is this intended or could it be added to the package?