If this exact question has been asked before, please point me to the relevant question.
tl;dr: How does one compare two strings in JavaScript while ignoring casing according to English rules?
My code analyzes and compares data from two different sources, each with different opinions about whether keywords should be upper or lower case, meaning that a case-insensitive comparison is required. However, I don't want the system to break if used in other cultures (such as Turkey and its notorious problems with the letter I).
Does JavaScript have any way of doing a culture-independent (read: English) case-insensitive string comparison?
How does one compare two strings in JavaScript without breaking if used in other cultures (such as Turkey and its notorious problems with the letter I)? Does JavaScript have any way of doing a culture-independent case-insensitive string comparison?
Yes, by simply using the standard .toLowerCase method which is not affected by locale settings. a.toLowerCase() == b.toLowerCase() is perfectly fine. The spec even mandates:
The result must be derived according to the case mappings in the Unicode character database
This definitely is consistent across all systems regardless of their settings.
For respecting the current locale, you would use .toLocaleLowerCase explicitly. MDN states:
In most cases, this will produce the same result as toLowerCase(), but for some locales, such as Turkish, whose case mappings do not follow the default case mappings in Unicode, there may be a different result.
However, relying on locales does not seem to work well…
In theory there is a method for that: String.localCompare().
The problem is that it's not implemented correctly by most browsers.
You might have more luck using String.toLocaleLowerCase().
Example:
if ("Äpfel".toLocaleLowerCase() == "äpfel".toLocaleLowerCase()) alert("Case Insensitive Match")
Be aware that following will not match (because ä and a are different characters):
if ("Äpfel".toLocaleLowerCase() == "apfel".toLocaleLowerCase()) alert("Case Insensitive Match")
You can use localeCompare but be aware that it is implemented differently between browsers. What seems to work in Chrome/Firefox/IE11 is:
first.localeCompare("First", navigator.language, { sensitivity: "base" }) === 0
var console = function() {
var log = function(message) {
strMessage = "<p>" + message + "</p>";
$("#console").append(strMessage);
};
return {
log: log
};
}()
var first = "first";
var result = first.localeCompare("First", navigator.language, { sensitivity: "base" }) === 0;
console.log(result);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="console">
</div>
Related
I've a little problem.
I'm using NodeJS as backend. Now, an user has a field "biography", where the user can write something about himself.
Suppose that this field has 220 maxlength, and suppose this as input:
👶🏻👦🏻👧🏻👨🏻👩🏻👱🏻♀️👱🏻👴🏻👵🏻👲🏻👳🏻♀️👳🏻👮🏻♀️👮🏻👷🏻♀️👷🏻💂🏻♀️💂🏻🕵🏻♀️👩🏻⚕️👨🏻⚕️👩🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾
As you can see there aren't 220 emojis (there are 37 emojis), but if I do in my nodejs server
console.log(bio.length)
where bio is the input text, I got 221. How could I "parse" the string input to get the correct length? Is it a problem about unicode?
SOLVED
I used this library: https://github.com/orling/grapheme-splitter
I tried that:
var Grapheme = require('grapheme-splitter');
var splitter = new Grapheme();
console.log(splitter.splitGraphemes(bio).length);
and the length is 37. It works very well!
str.length gives the count of UTF-16 units.
Unicode-proof way to get string length in codepoints (in characters) is [...str].length as iterable protocol splits the string to codepoints.
If we need the length in graphemes (grapheme clusters), we have these native ways:
a. Unicode property escapes in RegExp. See for example: Unicode-aware version of \w or Matching emoji.
b. Intl.Segmenter — coming soon, probably in ES2021. Can be tested with a flag in the last V8 versions (realization was synced with the last spec in V8 86). Unflagged (shipped) in V8 87.
See also:
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
What every JavaScript developer should know about Unicode
JavaScript has a Unicode problem
Unicode-aware regular expressions in ES2015
ES6 Strings (and Unicode, ❤) in Depth
JavaScript for impatient programmers. Unicode – a brief introduction
TL;DR there are solutions, but they don’t work in every case. Unicode can feel like a dark art.
There seems to be limitations in various solutions I have seen presented, with the issue going beyond emojis and covering other characters in the Unicode range. Consider é can be stored as é or e + ‘, if using combing characters. This can even lead to two strings that look the same not being equal. Also note, in certain cases a single emoji can be 11 characters when stored and as a result 22 bytes, assuming UTF16.
The way this is handled and how characters are combined, or displayed, can even vary between browsers and operating systems. So, while you may think you cracked it, there is a risk another environment breaks this. Be sure to test where it matters.
Now, there is the front-end vs back-end problem: you solved the character count problem so it works well for human users, now your single emoji blows right past the allocated field size in the database. Less of an issue with databases such as mongo, but can be one with SQL databases, where field allocation was conservative. This means how you solve your problem will depend where the hardest limitation comes in.
Note, that a basic solution does involve converting a string to an array and getting the length, accepting limitations:
Array.from(str)
This will fall apart when characters are combined and dealing with astral planes.
A few high level approaches, that take into account limitations:
use approaches that solve the front-end issue, as best as possible, and then ensure storage issues are resolved
be more conservative with the advertised front-end limits, if the database or other storage can’t be adjusted
limit the character types that can be entered
clearly indicate limitations of the length calculation
Additionally, given the complexity of the issue it may be worth seeing if there is a popular JS library that already deals with this? I did not find one at the time of writing. Hopefully this is something that would become core to Javascript at some point.
Other pages to read:
https://blog.jonnew.com/posts/poo-dot-length-equals-two
https://mathiasbynens.be/notes/javascript-unicode
https://www.contentful.com/blog/2016/12/06/unicode-javascript-and-the-emoji-family/
https://dmitripavlutin.com/what-every-javascript-developer-should-know-about-unicode/
I answered to a similar question here
But basically, here it is :
'👍'.match(/./gu).length == 1
As :
'👍'.length == 2
More precision in my original post
function fancyCount2(str){
const joiner = "\u{200D}";
const split = str.split(joiner);
let count = 0;
for(const s of split){
//removing the variation selectors
const num = Array.from(s.split(/[\ufe00-\ufe0f]/).join("")).length;
count += num;
}
//assuming the joiners are used appropriately
return count / split.length;
}
With a regex that can parse emojis, this can be done easily and without the use of external libraries. Please see the code snippets for examples. 👷🏻♀️
Note that grapheme-splitter as suggested in the question will overcount and split apart compound emojis that contain other emojis, such as this one: 🧑🏻🤝🧑🏻. This is reported as three distinct "graphemes", 🧑🏻 and 🤝 and 🧑🏻
Here we are using the 'compact', literal version so it'll fit, but there's a safe, long version that uses Unicode escapes as well.
For more info on the regex see also this answer.
/*the pattern (compact version)*/
var emojiPattern = String.raw`(?:🧑🏻❤️💋🧑🏼|🧑🏻❤️💋🧑🏽|🧑🏻❤️💋🧑🏾|🧑🏻❤️💋🧑🏿|🧑🏼❤️💋🧑🏻|🧑🏼❤️💋🧑🏽|🧑🏼❤️💋🧑🏾|🧑🏼❤️💋🧑🏿|🧑🏽❤️💋🧑🏻|🧑🏽❤️💋🧑🏼|🧑🏽❤️💋🧑🏾|🧑🏽❤️💋🧑🏿|🧑🏾❤️💋🧑🏻|🧑🏾❤️💋🧑🏼|🧑🏾❤️💋🧑🏽|🧑🏾❤️💋🧑🏿|🧑🏿❤️💋🧑🏻|🧑🏿❤️💋🧑🏼|🧑🏿❤️💋🧑🏽|🧑🏿❤️💋🧑🏾|👩🏻❤️💋👨🏻|👩🏻❤️💋👨🏼|👩🏻❤️💋👨🏽|👩🏻❤️💋👨🏾|👩🏻❤️💋👨🏿|👩🏼❤️💋👨🏻|👩🏼❤️💋👨🏼|👩🏼❤️💋👨🏽|👩🏼❤️💋👨🏾|👩🏼❤️💋👨🏿|👩🏽❤️💋👨🏻|👩🏽❤️💋👨🏼|👩🏽❤️💋👨🏽|👩🏽❤️💋👨🏾|👩🏽❤️💋👨🏿|👩🏾❤️💋👨🏻|👩🏾❤️💋👨🏼|👩🏾❤️💋👨🏽|👩🏾❤️💋👨🏾|👩🏾❤️💋👨🏿|👩🏿❤️💋👨🏻|👩🏿❤️💋👨🏼|👩🏿❤️💋👨🏽|👩🏿❤️💋👨🏾|👩🏿❤️💋👨🏿|👨🏻❤️💋👨🏻|👨🏻❤️💋👨🏼|👨🏻❤️💋👨🏽|👨🏻❤️💋👨🏾|👨🏻❤️💋👨🏿|👨🏼❤️💋👨🏻|👨🏼❤️💋👨🏼|👨🏼❤️💋👨🏽|👨🏼❤️💋👨🏾|👨🏼❤️💋👨🏿|👨🏽❤️💋👨🏻|👨🏽❤️💋👨🏼|👨🏽❤️💋👨🏽|👨🏽❤️💋👨🏾|👨🏽❤️💋👨🏿|👨🏾❤️💋👨🏻|👨🏾❤️💋👨🏼|👨🏾❤️💋👨🏽|👨🏾❤️💋👨🏾|👨🏾❤️💋👨🏿|👨🏿❤️💋👨🏻|👨🏿❤️💋👨🏼|👨🏿❤️💋👨🏽|👨🏿❤️💋👨🏾|👨🏿❤️💋👨🏿|👩🏻❤️💋👩🏻|👩🏻❤️💋👩🏼|👩🏻❤️💋👩🏽|👩🏻❤️💋👩🏾|👩🏻❤️💋👩🏿|👩🏼❤️💋👩🏻|👩🏼❤️💋👩🏼|👩🏼❤️💋👩🏽|👩🏼❤️💋👩🏾|👩🏼❤️💋👩🏿|👩🏽❤️💋👩🏻|👩🏽❤️💋👩🏼|👩🏽❤️💋👩🏽|👩🏽❤️💋👩🏾|👩🏽❤️💋👩🏿|👩🏾❤️💋👩🏻|👩🏾❤️💋👩🏼|👩🏾❤️💋👩🏽|👩🏾❤️💋👩🏾|👩🏾❤️💋👩🏿|👩🏿❤️💋👩🏻|👩🏿❤️💋👩🏼|👩🏿❤️💋👩🏽|👩🏿❤️💋👩🏾|👩🏿❤️💋👩🏿|🏴|🏴|🏴|🧑🏻🤝🧑🏻|🧑🏻🤝🧑🏼|🧑🏻🤝🧑🏽|🧑🏻🤝🧑🏾|🧑🏻🤝🧑🏿|🧑🏼🤝🧑🏻|🧑🏼🤝🧑🏼|🧑🏼🤝🧑🏽|🧑🏼🤝🧑🏾|🧑🏼🤝🧑🏿|🧑🏽🤝🧑🏻|🧑🏽🤝🧑🏼|🧑🏽🤝🧑🏽|🧑🏽🤝🧑🏾|🧑🏽🤝🧑🏿|🧑🏾🤝🧑🏻|🧑🏾🤝🧑🏼|🧑🏾🤝🧑🏽|🧑🏾🤝🧑🏾|🧑🏾🤝🧑🏿|🧑🏿🤝🧑🏻|🧑🏿🤝🧑🏼|🧑🏿🤝🧑🏽|🧑🏿🤝🧑🏾|🧑🏿🤝🧑🏿|👩🏻🤝👩🏼|👩🏻🤝👩🏽|👩🏻🤝👩🏾|👩🏻🤝👩🏿|👩🏼🤝👩🏻|👩🏼🤝👩🏽|👩🏼🤝👩🏾|👩🏼🤝👩🏿|👩🏽🤝👩🏻|👩🏽🤝👩🏼|👩🏽🤝👩🏾|👩🏽🤝👩🏿|👩🏾🤝👩🏻|👩🏾🤝👩🏼|👩🏾🤝👩🏽|👩🏾🤝👩🏿|👩🏿🤝👩🏻|👩🏿🤝👩🏼|👩🏿🤝👩🏽|👩🏿🤝👩🏾|👩🏻🤝👨🏼|👩🏻🤝👨🏽|👩🏻🤝👨🏾|👩🏻🤝👨🏿|👩🏼🤝👨🏻|👩🏼🤝👨🏽|👩🏼🤝👨🏾|👩🏼🤝👨🏿|👩🏽🤝👨🏻|👩🏽🤝👨🏼|👩🏽🤝👨🏾|👩🏽🤝👨🏿|👩🏾🤝👨🏻|👩🏾🤝👨🏼|👩🏾🤝👨🏽|👩🏾🤝👨🏿|👩🏿🤝👨🏻|👩🏿🤝👨🏼|👩🏿🤝👨🏽|👩🏿🤝👨🏾|👨🏻🤝👨🏼|👨🏻🤝👨🏽|👨🏻🤝👨🏾|👨🏻🤝👨🏿|👨🏼🤝👨🏻|👨🏼🤝👨🏽|👨🏼🤝👨🏾|👨🏼🤝👨🏿|👨🏽🤝👨🏻|👨🏽🤝👨🏼|👨🏽🤝👨🏾|👨🏽🤝👨🏿|👨🏾🤝👨🏻|👨🏾🤝👨🏼|👨🏾🤝👨🏽|👨🏾🤝👨🏿|👨🏿🤝👨🏻|👨🏿🤝👨🏼|👨🏿🤝👨🏽|👨🏿🤝👨🏾|🧑🏻❤️🧑🏼|🧑🏻❤️🧑🏽|🧑🏻❤️🧑🏾|🧑🏻❤️🧑🏿|🧑🏼❤️🧑🏻|🧑🏼❤️🧑🏽|🧑🏼❤️🧑🏾|🧑🏼❤️🧑🏿|🧑🏽❤️🧑🏻|🧑🏽❤️🧑🏼|🧑🏽❤️🧑🏾|🧑🏽❤️🧑🏿|🧑🏾❤️🧑🏻|🧑🏾❤️🧑🏼|🧑🏾❤️🧑🏽|🧑🏾❤️🧑🏿|🧑🏿❤️🧑🏻|🧑🏿❤️🧑🏼|🧑🏿❤️🧑🏽|🧑🏿❤️🧑🏾|👩🏻❤️👨🏻|👩🏻❤️👨🏼|👩🏻❤️👨🏽|👩🏻❤️👨🏾|👩🏻❤️👨🏿|👩🏼❤️👨🏻|👩🏼❤️👨🏼|👩🏼❤️👨🏽|👩🏼❤️👨🏾|👩🏼❤️👨🏿|👩🏽❤️👨🏻|👩🏽❤️👨🏼|👩🏽❤️👨🏽|👩🏽❤️👨🏾|👩🏽❤️👨🏿|👩🏾❤️👨🏻|👩🏾❤️👨🏼|👩🏾❤️👨🏽|👩🏾❤️👨🏾|👩🏾❤️👨🏿|👩🏿❤️👨🏻|👩🏿❤️👨🏼|👩🏿❤️👨🏽|👩🏿❤️👨🏾|👩🏿❤️👨🏿|👨🏻❤️👨🏻|👨🏻❤️👨🏼|👨🏻❤️👨🏽|👨🏻❤️👨🏾|👨🏻❤️👨🏿|👨🏼❤️👨🏻|👨🏼❤️👨🏼|👨🏼❤️👨🏽|👨🏼❤️👨🏾|👨🏼❤️👨🏿|👨🏽❤️👨🏻|👨🏽❤️👨🏼|👨🏽❤️👨🏽|👨🏽❤️👨🏾|👨🏽❤️👨🏿|👨🏾❤️👨🏻|👨🏾❤️👨🏼|👨🏾❤️👨🏽|👨🏾❤️👨🏾|👨🏾❤️👨🏿|👨🏿❤️👨🏻|👨🏿❤️👨🏼|👨🏿❤️👨🏽|👨🏿❤️👨🏾|👨🏿❤️👨🏿|👩🏻❤️👩🏻|👩🏻❤️👩🏼|👩🏻❤️👩🏽|👩🏻❤️👩🏾|👩🏻❤️👩🏿|👩🏼❤️👩🏻|👩🏼❤️👩🏼|👩🏼❤️👩🏽|👩🏼❤️👩🏾|👩🏼❤️👩🏿|👩🏽❤️👩🏻|👩🏽❤️👩🏼|👩🏽❤️👩🏽|👩🏽❤️👩🏾|👩🏽❤️👩🏿|👩🏾❤️👩🏻|👩🏾❤️👩🏼|👩🏾❤️👩🏽|👩🏾❤️👩🏾|👩🏾❤️👩🏿|👩🏿❤️👩🏻|👩🏿❤️👩🏼|👩🏿❤️👩🏽|👩🏿❤️👩🏾|👩🏿❤️👩🏿|👩❤️💋👨|👨❤️💋👨|👩❤️💋👩|👨👩👧👦|👨👩👦👦|👨👩👧👧|👨👨👧👦|👨👨👦👦|👨👨👧👧|👩👩👧👦|👩👩👦👦|👩👩👧👧|🧑🤝🧑|👩❤️👨|👨❤️👨|👩❤️👩|👨👩👦|👨👩👧|👨👨👦|👨👨👧|👩👩👦|👩👩👧|👨👦👦|👨👧👦|👨👧👧|👩👦👦|👩👧👦|👩👧👧|👁️🗨️|🧔🏻♂️|🧔🏼♂️|🧔🏽♂️|🧔🏾♂️|🧔🏿♂️|🧔🏻♀️|🧔🏼♀️|🧔🏽♀️|🧔🏾♀️|🧔🏿♀️|👨🏻🦰|👨🏼🦰|👨🏽🦰|👨🏾🦰|👨🏿🦰|👨🏻🦱|👨🏼🦱|👨🏽🦱|👨🏾🦱|👨🏿🦱|👨🏻🦳|👨🏼🦳|👨🏽🦳|👨🏾🦳|👨🏿🦳|👨🏻🦲|👨🏼🦲|👨🏽🦲|👨🏾🦲|👨🏿🦲|👩🏻🦰|👩🏼🦰|👩🏽🦰|👩🏾🦰|👩🏿🦰|🧑🏻🦰|🧑🏼🦰|🧑🏽🦰|🧑🏾🦰|🧑🏿🦰|👩🏻🦱|👩🏼🦱|👩🏽🦱|👩🏾🦱|👩🏿🦱|🧑🏻🦱|🧑🏼🦱|🧑🏽🦱|🧑🏾🦱|🧑🏿🦱|👩🏻🦳|👩🏼🦳|👩🏽🦳|👩🏾🦳|👩🏿🦳|🧑🏻🦳|🧑🏼🦳|🧑🏽🦳|🧑🏾🦳|🧑🏿🦳|👩🏻🦲|👩🏼🦲|👩🏽🦲|👩🏾🦲|👩🏿🦲|🧑🏻🦲|🧑🏼🦲|🧑🏽🦲|🧑🏾🦲|🧑🏿🦲|👱🏻♀️|👱🏼♀️|👱🏽♀️|👱🏾♀️|👱🏿♀️|👱🏻♂️|👱🏼♂️|👱🏽♂️|👱🏾♂️|👱🏿♂️|🙍🏻♂️|🙍🏼♂️|🙍🏽♂️|🙍🏾♂️|🙍🏿♂️|🙍🏻♀️|🙍🏼♀️|🙍🏽♀️|🙍🏾♀️|🙍🏿♀️|🙎🏻♂️|🙎🏼♂️|🙎🏽♂️|🙎🏾♂️|🙎🏿♂️|🙎🏻♀️|🙎🏼♀️|🙎🏽♀️|🙎🏾♀️|🙎🏿♀️|🙅🏻♂️|🙅🏼♂️|🙅🏽♂️|🙅🏾♂️|🙅🏿♂️|🙅🏻♀️|🙅🏼♀️|🙅🏽♀️|🙅🏾♀️|🙅🏿♀️|🙆🏻♂️|🙆🏼♂️|🙆🏽♂️|🙆🏾♂️|🙆🏿♂️|🙆🏻♀️|🙆🏼♀️|🙆🏽♀️|🙆🏾♀️|🙆🏿♀️|💁🏻♂️|💁🏼♂️|💁🏽♂️|💁🏾♂️|💁🏿♂️|💁🏻♀️|💁🏼♀️|💁🏽♀️|💁🏾♀️|💁🏿♀️|🙋🏻♂️|🙋🏼♂️|🙋🏽♂️|🙋🏾♂️|🙋🏿♂️|🙋🏻♀️|🙋🏼♀️|🙋🏽♀️|🙋🏾♀️|🙋🏿♀️|🧏🏻♂️|🧏🏼♂️|🧏🏽♂️|🧏🏾♂️|🧏🏿♂️|🧏🏻♀️|🧏🏼♀️|🧏🏽♀️|🧏🏾♀️|🧏🏿♀️|🙇🏻♂️|🙇🏼♂️|🙇🏽♂️|🙇🏾♂️|🙇🏿♂️|🙇🏻♀️|🙇🏼♀️|🙇🏽♀️|🙇🏾♀️|🙇🏿♀️|🤦🏻♂️|🤦🏼♂️|🤦🏽♂️|🤦🏾♂️|🤦🏿♂️|🤦🏻♀️|🤦🏼♀️|🤦🏽♀️|🤦🏾♀️|🤦🏿♀️|🤷🏻♂️|🤷🏼♂️|🤷🏽♂️|🤷🏾♂️|🤷🏿♂️|🤷🏻♀️|🤷🏼♀️|🤷🏽♀️|🤷🏾♀️|🤷🏿♀️|🧑🏻⚕️|🧑🏼⚕️|🧑🏽⚕️|🧑🏾⚕️|🧑🏿⚕️|👨🏻⚕️|👨🏼⚕️|👨🏽⚕️|👨🏾⚕️|👨🏿⚕️|👩🏻⚕️|👩🏼⚕️|👩🏽⚕️|👩🏾⚕️|👩🏿⚕️|🧑🏻🎓|🧑🏼🎓|🧑🏽🎓|🧑🏾🎓|🧑🏿🎓|👨🏻🎓|👨🏼🎓|👨🏽🎓|👨🏾🎓|👨🏿🎓|👩🏻🎓|👩🏼🎓|👩🏽🎓|👩🏾🎓|👩🏿🎓|🧑🏻🏫|🧑🏼🏫|🧑🏽🏫|🧑🏾🏫|🧑🏿🏫|👨🏻🏫|👨🏼🏫|👨🏽🏫|👨🏾🏫|👨🏿🏫|👩🏻🏫|👩🏼🏫|👩🏽🏫|👩🏾🏫|👩🏿🏫|🧑🏻⚖️|🧑🏼⚖️|🧑🏽⚖️|🧑🏾⚖️|🧑🏿⚖️|👨🏻⚖️|👨🏼⚖️|👨🏽⚖️|👨🏾⚖️|👨🏿⚖️|👩🏻⚖️|👩🏼⚖️|👩🏽⚖️|👩🏾⚖️|👩🏿⚖️|🧑🏻🌾|🧑🏼🌾|🧑🏽🌾|🧑🏾🌾|🧑🏿🌾|👨🏻🌾|👨🏼🌾|👨🏽🌾|👨🏾🌾|👨🏿🌾|👩🏻🌾|👩🏼🌾|👩🏽🌾|👩🏾🌾|👩🏿🌾|🧑🏻🍳|🧑🏼🍳|🧑🏽🍳|🧑🏾🍳|🧑🏿🍳|👨🏻🍳|👨🏼🍳|👨🏽🍳|👨🏾🍳|👨🏿🍳|👩🏻🍳|👩🏼🍳|👩🏽🍳|👩🏾🍳|👩🏿🍳|🧑🏻🔧|🧑🏼🔧|🧑🏽🔧|🧑🏾🔧|🧑🏿🔧|👨🏻🔧|👨🏼🔧|👨🏽🔧|👨🏾🔧|👨🏿🔧|👩🏻🔧|👩🏼🔧|👩🏽🔧|👩🏾🔧|👩🏿🔧|🧑🏻🏭|🧑🏼🏭|🧑🏽🏭|🧑🏾🏭|🧑🏿🏭|👨🏻🏭|👨🏼🏭|👨🏽🏭|👨🏾🏭|👨🏿🏭|👩🏻🏭|👩🏼🏭|👩🏽🏭|👩🏾🏭|👩🏿🏭|🧑🏻💼|🧑🏼💼|🧑🏽💼|🧑🏾💼|🧑🏿💼|👨🏻💼|👨🏼💼|👨🏽💼|👨🏾💼|👨🏿💼|👩🏻💼|👩🏼💼|👩🏽💼|👩🏾💼|👩🏿💼|🧑🏻🔬|🧑🏼🔬|🧑🏽🔬|🧑🏾🔬|🧑🏿🔬|👨🏻🔬|👨🏼🔬|👨🏽🔬|👨🏾🔬|👨🏿🔬|👩🏻🔬|👩🏼🔬|👩🏽🔬|👩🏾🔬|👩🏿🔬|🧑🏻💻|🧑🏼💻|🧑🏽💻|🧑🏾💻|🧑🏿💻|👨🏻💻|👨🏼💻|👨🏽💻|👨🏾💻|👨🏿💻|👩🏻💻|👩🏼💻|👩🏽💻|👩🏾💻|👩🏿💻|🧑🏻🎤|🧑🏼🎤|🧑🏽🎤|🧑🏾🎤|🧑🏿🎤|👨🏻🎤|👨🏼🎤|👨🏽🎤|👨🏾🎤|👨🏿🎤|👩🏻🎤|👩🏼🎤|👩🏽🎤|👩🏾🎤|👩🏿🎤|🧑🏻🎨|🧑🏼🎨|🧑🏽🎨|🧑🏾🎨|🧑🏿🎨|👨🏻🎨|👨🏼🎨|👨🏽🎨|👨🏾🎨|👨🏿🎨|👩🏻🎨|👩🏼🎨|👩🏽🎨|👩🏾🎨|👩🏿🎨|🧑🏻✈️|🧑🏼✈️|🧑🏽✈️|🧑🏾✈️|🧑🏿✈️|👨🏻✈️|👨🏼✈️|👨🏽✈️|👨🏾✈️|👨🏿✈️|👩🏻✈️|👩🏼✈️|👩🏽✈️|👩🏾✈️|👩🏿✈️|🧑🏻🚀|🧑🏼🚀|🧑🏽🚀|🧑🏾🚀|🧑🏿🚀|👨🏻🚀|👨🏼🚀|👨🏽🚀|👨🏾🚀|👨🏿🚀|👩🏻🚀|👩🏼🚀|👩🏽🚀|👩🏾🚀|👩🏿🚀|🧑🏻🚒|🧑🏼🚒|🧑🏽🚒|🧑🏾🚒|🧑🏿🚒|👨🏻🚒|👨🏼🚒|👨🏽🚒|👨🏾🚒|👨🏿🚒|👩🏻🚒|👩🏼🚒|👩🏽🚒|👩🏾🚒|👩🏿🚒|👮🏻♂️|👮🏼♂️|👮🏽♂️|👮🏾♂️|👮🏿♂️|👮🏻♀️|👮🏼♀️|👮🏽♀️|👮🏾♀️|👮🏿♀️|🕵🏻♂️|🕵🏼♂️|🕵🏽♂️|🕵🏾♂️|🕵🏿♂️|🕵🏻♀️|🕵🏼♀️|🕵🏽♀️|🕵🏾♀️|🕵🏿♀️|💂🏻♂️|💂🏼♂️|💂🏽♂️|💂🏾♂️|💂🏿♂️|💂🏻♀️|💂🏼♀️|💂🏽♀️|💂🏾♀️|💂🏿♀️|👷🏻♂️|👷🏼♂️|👷🏽♂️|👷🏾♂️|👷🏿♂️|👷🏻♀️|👷🏼♀️|👷🏽♀️|👷🏾♀️|👷🏿♀️|👳🏻♂️|👳🏼♂️|👳🏽♂️|👳🏾♂️|👳🏿♂️|👳🏻♀️|👳🏼♀️|👳🏽♀️|👳🏾♀️|👳🏿♀️|🤵🏻♂️|🤵🏼♂️|🤵🏽♂️|🤵🏾♂️|🤵🏿♂️|🤵🏻♀️|🤵🏼♀️|🤵🏽♀️|🤵🏾♀️|🤵🏿♀️|👰🏻♂️|👰🏼♂️|👰🏽♂️|👰🏾♂️|👰🏿♂️|👰🏻♀️|👰🏼♀️|👰🏽♀️|👰🏾♀️|👰🏿♀️|👩🏻🍼|👩🏼🍼|👩🏽🍼|👩🏾🍼|👩🏿🍼|👨🏻🍼|👨🏼🍼|👨🏽🍼|👨🏾🍼|👨🏿🍼|🧑🏻🍼|🧑🏼🍼|🧑🏽🍼|🧑🏾🍼|🧑🏿🍼|🧑🏻🎄|🧑🏼🎄|🧑🏽🎄|🧑🏾🎄|🧑🏿🎄|🦸🏻♂️|🦸🏼♂️|🦸🏽♂️|🦸🏾♂️|🦸🏿♂️|🦸🏻♀️|🦸🏼♀️|🦸🏽♀️|🦸🏾♀️|🦸🏿♀️|🦹🏻♂️|🦹🏼♂️|🦹🏽♂️|🦹🏾♂️|🦹🏿♂️|🦹🏻♀️|🦹🏼♀️|🦹🏽♀️|🦹🏾♀️|🦹🏿♀️|🧙🏻♂️|🧙🏼♂️|🧙🏽♂️|🧙🏾♂️|🧙🏿♂️|🧙🏻♀️|🧙🏼♀️|🧙🏽♀️|🧙🏾♀️|🧙🏿♀️|🧚🏻♂️|🧚🏼♂️|🧚🏽♂️|🧚🏾♂️|🧚🏿♂️|🧚🏻♀️|🧚🏼♀️|🧚🏽♀️|🧚🏾♀️|🧚🏿♀️|🧛🏻♂️|🧛🏼♂️|🧛🏽♂️|🧛🏾♂️|🧛🏿♂️|🧛🏻♀️|🧛🏼♀️|🧛🏽♀️|🧛🏾♀️|🧛🏿♀️|🧜🏻♂️|🧜🏼♂️|🧜🏽♂️|🧜🏾♂️|🧜🏿♂️|🧜🏻♀️|🧜🏼♀️|🧜🏽♀️|🧜🏾♀️|🧜🏿♀️|🧝🏻♂️|🧝🏼♂️|🧝🏽♂️|🧝🏾♂️|🧝🏿♂️|🧝🏻♀️|🧝🏼♀️|🧝🏽♀️|🧝🏾♀️|🧝🏿♀️|💆🏻♂️|💆🏼♂️|💆🏽♂️|💆🏾♂️|💆🏿♂️|💆🏻♀️|💆🏼♀️|💆🏽♀️|💆🏾♀️|💆🏿♀️|💇🏻♂️|💇🏼♂️|💇🏽♂️|💇🏾♂️|💇🏿♂️|💇🏻♀️|💇🏼♀️|💇🏽♀️|💇🏾♀️|💇🏿♀️|🚶🏻♂️|🚶🏼♂️|🚶🏽♂️|🚶🏾♂️|🚶🏿♂️|🚶🏻♀️|🚶🏼♀️|🚶🏽♀️|🚶🏾♀️|🚶🏿♀️|🧍🏻♂️|🧍🏼♂️|🧍🏽♂️|🧍🏾♂️|🧍🏿♂️|🧍🏻♀️|🧍🏼♀️|🧍🏽♀️|🧍🏾♀️|🧍🏿♀️|🧎🏻♂️|🧎🏼♂️|🧎🏽♂️|🧎🏾♂️|🧎🏿♂️|🧎🏻♀️|🧎🏼♀️|🧎🏽♀️|🧎🏾♀️|🧎🏿♀️|🧑🏻🦯|🧑🏼🦯|🧑🏽🦯|🧑🏾🦯|🧑🏿🦯|👨🏻🦯|👨🏼🦯|👨🏽🦯|👨🏾🦯|👨🏿🦯|👩🏻🦯|👩🏼🦯|👩🏽🦯|👩🏾🦯|👩🏿🦯|🧑🏻🦼|🧑🏼🦼|🧑🏽🦼|🧑🏾🦼|🧑🏿🦼|👨🏻🦼|👨🏼🦼|👨🏽🦼|👨🏾🦼|👨🏿🦼|👩🏻🦼|👩🏼🦼|👩🏽🦼|👩🏾🦼|👩🏿🦼|🧑🏻🦽|🧑🏼🦽|🧑🏽🦽|🧑🏾🦽|🧑🏿🦽|👨🏻🦽|👨🏼🦽|👨🏽🦽|👨🏾🦽|👨🏿🦽|👩🏻🦽|👩🏼🦽|👩🏽🦽|👩🏾🦽|👩🏿🦽|🏃🏻♂️|🏃🏼♂️|🏃🏽♂️|🏃🏾♂️|🏃🏿♂️|🏃🏻♀️|🏃🏼♀️|🏃🏽♀️|🏃🏾♀️|🏃🏿♀️|🧖🏻♂️|🧖🏼♂️|🧖🏽♂️|🧖🏾♂️|🧖🏿♂️|🧖🏻♀️|🧖🏼♀️|🧖🏽♀️|🧖🏾♀️|🧖🏿♀️|🧗🏻♂️|🧗🏼♂️|🧗🏽♂️|🧗🏾♂️|🧗🏿♂️|🧗🏻♀️|🧗🏼♀️|🧗🏽♀️|🧗🏾♀️|🧗🏿♀️|🏌🏻♂️|🏌🏼♂️|🏌🏽♂️|🏌🏾♂️|🏌🏿♂️|🏌🏻♀️|🏌🏼♀️|🏌🏽♀️|🏌🏾♀️|🏌🏿♀️|🏄🏻♂️|🏄🏼♂️|🏄🏽♂️|🏄🏾♂️|🏄🏿♂️|🏄🏻♀️|🏄🏼♀️|🏄🏽♀️|🏄🏾♀️|🏄🏿♀️|🚣🏻♂️|🚣🏼♂️|🚣🏽♂️|🚣🏾♂️|🚣🏿♂️|🚣🏻♀️|🚣🏼♀️|🚣🏽♀️|🚣🏾♀️|🚣🏿♀️|🏊🏻♂️|🏊🏼♂️|🏊🏽♂️|🏊🏾♂️|🏊🏿♂️|🏊🏻♀️|🏊🏼♀️|🏊🏽♀️|🏊🏾♀️|🏊🏿♀️|🏋🏻♂️|🏋🏼♂️|🏋🏽♂️|🏋🏾♂️|🏋🏿♂️|🏋🏻♀️|🏋🏼♀️|🏋🏽♀️|🏋🏾♀️|🏋🏿♀️|🚴🏻♂️|🚴🏼♂️|🚴🏽♂️|🚴🏾♂️|🚴🏿♂️|🚴🏻♀️|🚴🏼♀️|🚴🏽♀️|🚴🏾♀️|🚴🏿♀️|🚵🏻♂️|🚵🏼♂️|🚵🏽♂️|🚵🏾♂️|🚵🏿♂️|🚵🏻♀️|🚵🏼♀️|🚵🏽♀️|🚵🏾♀️|🚵🏿♀️|🤸🏻♂️|🤸🏼♂️|🤸🏽♂️|🤸🏾♂️|🤸🏿♂️|🤸🏻♀️|🤸🏼♀️|🤸🏽♀️|🤸🏾♀️|🤸🏿♀️|🤽🏻♂️|🤽🏼♂️|🤽🏽♂️|🤽🏾♂️|🤽🏿♂️|🤽🏻♀️|🤽🏼♀️|🤽🏽♀️|🤽🏾♀️|🤽🏿♀️|🤾🏻♂️|🤾🏼♂️|🤾🏽♂️|🤾🏾♂️|🤾🏿♂️|🤾🏻♀️|🤾🏼♀️|🤾🏽♀️|🤾🏾♀️|🤾🏿♀️|🤹🏻♂️|🤹🏼♂️|🤹🏽♂️|🤹🏾♂️|🤹🏿♂️|🤹🏻♀️|🤹🏼♀️|🤹🏽♀️|🤹🏾♀️|🤹🏿♀️|🧘🏻♂️|🧘🏼♂️|🧘🏽♂️|🧘🏾♂️|🧘🏿♂️|🧘🏻♀️|🧘🏼♀️|🧘🏽♀️|🧘🏾♀️|🧘🏿♀️|😶🌫️|🕵️♂️|🕵️♀️|🏌️♂️|🏌️♀️|🏋️♂️|🏋️♀️|🏳️🌈|🏳️⚧️|⛹🏻♂️|⛹🏼♂️|⛹🏽♂️|⛹🏾♂️|⛹🏿♂️|⛹🏻♀️|⛹🏼♀️|⛹🏽♀️|⛹🏾♀️|⛹🏿♀️|😮💨|😵💫|❤️🔥|❤️🩹|🧔♂️|🧔♀️|👨🦰|👨🦱|👨🦳|👨🦲|👩🦰|🧑🦰|👩🦱|🧑🦱|👩🦳|🧑🦳|👩🦲|🧑🦲|👱♀️|👱♂️|🙍♂️|🙍♀️|🙎♂️|🙎♀️|🙅♂️|🙅♀️|🙆♂️|🙆♀️|💁♂️|💁♀️|🙋♂️|🙋♀️|🧏♂️|🧏♀️|🙇♂️|🙇♀️|🤦♂️|🤦♀️|🤷♂️|🤷♀️|🧑⚕️|👨⚕️|👩⚕️|🧑🎓|👨🎓|👩🎓|🧑🏫|👨🏫|👩🏫|🧑⚖️|👨⚖️|👩⚖️|🧑🌾|👨🌾|👩🌾|🧑🍳|👨🍳|👩🍳|🧑🔧|👨🔧|👩🔧|🧑🏭|👨🏭|👩🏭|🧑💼|👨💼|👩💼|🧑🔬|👨🔬|👩🔬|🧑💻|👨💻|👩💻|🧑🎤|👨🎤|👩🎤|🧑🎨|👨🎨|👩🎨|🧑✈️|👨✈️|👩✈️|🧑🚀|👨🚀|👩🚀|🧑🚒|👨🚒|👩🚒|👮♂️|👮♀️|💂♂️|💂♀️|👷♂️|👷♀️|👳♂️|👳♀️|🤵♂️|🤵♀️|👰♂️|👰♀️|👩🍼|👨🍼|🧑🍼|🧑🎄|🦸♂️|🦸♀️|🦹♂️|🦹♀️|🧙♂️|🧙♀️|🧚♂️|🧚♀️|🧛♂️|🧛♀️|🧜♂️|🧜♀️|🧝♂️|🧝♀️|🧞♂️|🧞♀️|🧟♂️|🧟♀️|💆♂️|💆♀️|💇♂️|💇♀️|🚶♂️|🚶♀️|🧍♂️|🧍♀️|🧎♂️|🧎♀️|🧑🦯|👨🦯|👩🦯|🧑🦼|👨🦼|👩🦼|🧑🦽|👨🦽|👩🦽|🏃♂️|🏃♀️|👯♂️|👯♀️|🧖♂️|🧖♀️|🧗♂️|🧗♀️|🏄♂️|🏄♀️|🚣♂️|🚣♀️|🏊♂️|🏊♀️|⛹️♂️|⛹️♀️|🚴♂️|🚴♀️|🚵♂️|🚵♀️|🤸♂️|🤸♀️|🤼♂️|🤼♀️|🤽♂️|🤽♀️|🤾♂️|🤾♀️|🤹♂️|🤹♀️|🧘♂️|🧘♀️|👨👦|👨👧|👩👦|👩👧|🐕🦺|🐻❄️|🏴☠️|🐈⬛|🇦🇨|🇦🇩|🇦🇪|🇦🇫|🇦🇬|🇦🇮|🇦🇱|🇦🇲|🇦🇴|🇦🇶|🇦🇷|🇦🇸|🇦🇹|🇦🇺|🇦🇼|🇦🇽|🇦🇿|🇧🇦|🇧🇧|🇧🇩|🇧🇪|🇧🇫|🇧🇬|🇧🇭|🇧🇮|🇧🇯|🇧🇱|🇧🇲|🇧🇳|🇧🇴|🇧🇶|🇧🇷|🇧🇸|🇧🇹|🇧🇻|🇧🇼|🇧🇾|🇧🇿|🇨🇦|🇨🇨|🇨🇩|🇨🇫|🇨🇬|🇨🇭|🇨🇮|🇨🇰|🇨🇱|🇨🇲|🇨🇳|🇨🇴|🇨🇵|🇨🇷|🇨🇺|🇨🇻|🇨🇼|🇨🇽|🇨🇾|🇨🇿|🇩🇪|🇩🇬|🇩🇯|🇩🇰|🇩🇲|🇩🇴|🇩🇿|🇪🇦|🇪🇨|🇪🇪|🇪🇬|🇪🇭|🇪🇷|🇪🇸|🇪🇹|🇪🇺|🇫🇮|🇫🇯|🇫🇰|🇫🇲|🇫🇴|🇫🇷|🇬🇦|🇬🇧|🇬🇩|🇬🇪|🇬🇫|🇬🇬|🇬🇭|🇬🇮|🇬🇱|🇬🇲|🇬🇳|🇬🇵|🇬🇶|🇬🇷|🇬🇸|🇬🇹|🇬🇺|🇬🇼|🇬🇾|🇭🇰|🇭🇲|🇭🇳|🇭🇷|🇭🇹|🇭🇺|🇮🇨|🇮🇩|🇮🇪|🇮🇱|🇮🇲|🇮🇳|🇮🇴|🇮🇶|🇮🇷|🇮🇸|🇮🇹|🇯🇪|🇯🇲|🇯🇴|🇯🇵|🇰🇪|🇰🇬|🇰🇭|🇰🇮|🇰🇲|🇰🇳|🇰🇵|🇰🇷|🇰🇼|🇰🇾|🇰🇿|🇱🇦|🇱🇧|🇱🇨|🇱🇮|🇱🇰|🇱🇷|🇱🇸|🇱🇹|🇱🇺|🇱🇻|🇱🇾|🇲🇦|🇲🇨|🇲🇩|🇲🇪|🇲🇫|🇲🇬|🇲🇭|🇲🇰|🇲🇱|🇲🇲|🇲🇳|🇲🇴|🇲🇵|🇲🇶|🇲🇷|🇲🇸|🇲🇹|🇲🇺|🇲🇻|🇲🇼|🇲🇽|🇲🇾|🇲🇿|🇳🇦|🇳🇨|🇳🇪|🇳🇫|🇳🇬|🇳🇮|🇳🇱|🇳🇴|🇳🇵|🇳🇷|🇳🇺|🇳🇿|🇴🇲|🇵🇦|🇵🇪|🇵🇫|🇵🇬|🇵🇭|🇵🇰|🇵🇱|🇵🇲|🇵🇳|🇵🇷|🇵🇸|🇵🇹|🇵🇼|🇵🇾|🇶🇦|🇷🇪|🇷🇴|🇷🇸|🇷🇺|🇷🇼|🇸🇦|🇸🇧|🇸🇨|🇸🇩|🇸🇪|🇸🇬|🇸🇭|🇸🇮|🇸🇯|🇸🇰|🇸🇱|🇸🇲|🇸🇳|🇸🇴|🇸🇷|🇸🇸|🇸🇹|🇸🇻|🇸🇽|🇸🇾|🇸🇿|🇹🇦|🇹🇨|🇹🇩|🇹🇫|🇹🇬|🇹🇭|🇹🇯|🇹🇰|🇹🇱|🇹🇲|🇹🇳|🇹🇴|🇹🇷|🇹🇹|🇹🇻|🇹🇼|🇹🇿|🇺🇦|🇺🇬|🇺🇲|🇺🇳|🇺🇸|🇺🇾|🇺🇿|🇻🇦|🇻🇨|🇻🇪|🇻🇬|🇻🇮|🇻🇳|🇻🇺|🇼🇫|🇼🇸|🇽🇰|🇾🇪|🇾🇹|🇿🇦|🇿🇲|🇿🇼|👋🏻|👋🏼|👋🏽|👋🏾|👋🏿|🤚🏻|🤚🏼|🤚🏽|🤚🏾|🤚🏿|🖐🏻|🖐🏼|🖐🏽|🖐🏾|🖐🏿|🖖🏻|🖖🏼|🖖🏽|🖖🏾|🖖🏿|👌🏻|👌🏼|👌🏽|👌🏾|👌🏿|🤌🏻|🤌🏼|🤌🏽|🤌🏾|🤌🏿|🤏🏻|🤏🏼|🤏🏽|🤏🏾|🤏🏿|🤞🏻|🤞🏼|🤞🏽|🤞🏾|🤞🏿|🤟🏻|🤟🏼|🤟🏽|🤟🏾|🤟🏿|🤘🏻|🤘🏼|🤘🏽|🤘🏾|🤘🏿|🤙🏻|🤙🏼|🤙🏽|🤙🏾|🤙🏿|👈🏻|👈🏼|👈🏽|👈🏾|👈🏿|👉🏻|👉🏼|👉🏽|👉🏾|👉🏿|👆🏻|👆🏼|👆🏽|👆🏾|👆🏿|🖕🏻|🖕🏼|🖕🏽|🖕🏾|🖕🏿|👇🏻|👇🏼|👇🏽|👇🏾|👇🏿|👍🏻|👍🏼|👍🏽|👍🏾|👍🏿|👎🏻|👎🏼|👎🏽|👎🏾|👎🏿|👊🏻|👊🏼|👊🏽|👊🏾|👊🏿|🤛🏻|🤛🏼|🤛🏽|🤛🏾|🤛🏿|🤜🏻|🤜🏼|🤜🏽|🤜🏾|🤜🏿|👏🏻|👏🏼|👏🏽|👏🏾|👏🏿|🙌🏻|🙌🏼|🙌🏽|🙌🏾|🙌🏿|👐🏻|👐🏼|👐🏽|👐🏾|👐🏿|🤲🏻|🤲🏼|🤲🏽|🤲🏾|🤲🏿|🙏🏻|🙏🏼|🙏🏽|🙏🏾|🙏🏿|💅🏻|💅🏼|💅🏽|💅🏾|💅🏿|🤳🏻|🤳🏼|🤳🏽|🤳🏾|🤳🏿|💪🏻|💪🏼|💪🏽|💪🏾|💪🏿|🦵🏻|🦵🏼|🦵🏽|🦵🏾|🦵🏿|🦶🏻|🦶🏼|🦶🏽|🦶🏾|🦶🏿|👂🏻|👂🏼|👂🏽|👂🏾|👂🏿|🦻🏻|🦻🏼|🦻🏽|🦻🏾|🦻🏿|👃🏻|👃🏼|👃🏽|👃🏾|👃🏿|👶🏻|👶🏼|👶🏽|👶🏾|👶🏿|🧒🏻|🧒🏼|🧒🏽|🧒🏾|🧒🏿|👦🏻|👦🏼|👦🏽|👦🏾|👦🏿|👧🏻|👧🏼|👧🏽|👧🏾|👧🏿|🧑🏻|🧑🏼|🧑🏽|🧑🏾|🧑🏿|👱🏻|👱🏼|👱🏽|👱🏾|👱🏿|👨🏻|👨🏼|👨🏽|👨🏾|👨🏿|🧔🏻|🧔🏼|🧔🏽|🧔🏾|🧔🏿|👩🏻|👩🏼|👩🏽|👩🏾|👩🏿|🧓🏻|🧓🏼|🧓🏽|🧓🏾|🧓🏿|👴🏻|👴🏼|👴🏽|👴🏾|👴🏿|👵🏻|👵🏼|👵🏽|👵🏾|👵🏿|🙍🏻|🙍🏼|🙍🏽|🙍🏾|🙍🏿|🙎🏻|🙎🏼|🙎🏽|🙎🏾|🙎🏿|🙅🏻|🙅🏼|🙅🏽|🙅🏾|🙅🏿|🙆🏻|🙆🏼|🙆🏽|🙆🏾|🙆🏿|💁🏻|💁🏼|💁🏽|💁🏾|💁🏿|🙋🏻|🙋🏼|🙋🏽|🙋🏾|🙋🏿|🧏🏻|🧏🏼|🧏🏽|🧏🏾|🧏🏿|🙇🏻|🙇🏼|🙇🏽|🙇🏾|🙇🏿|🤦🏻|🤦🏼|🤦🏽|🤦🏾|🤦🏿|🤷🏻|🤷🏼|🤷🏽|🤷🏾|🤷🏿|👮🏻|👮🏼|👮🏽|👮🏾|👮🏿|🕵🏻|🕵🏼|🕵🏽|🕵🏾|🕵🏿|💂🏻|💂🏼|💂🏽|💂🏾|💂🏿|🥷🏻|🥷🏼|🥷🏽|🥷🏾|🥷🏿|👷🏻|👷🏼|👷🏽|👷🏾|👷🏿|🤴🏻|🤴🏼|🤴🏽|🤴🏾|🤴🏿|👸🏻|👸🏼|👸🏽|👸🏾|👸🏿|👳🏻|👳🏼|👳🏽|👳🏾|👳🏿|👲🏻|👲🏼|👲🏽|👲🏾|👲🏿|🧕🏻|🧕🏼|🧕🏽|🧕🏾|🧕🏿|🤵🏻|🤵🏼|🤵🏽|🤵🏾|🤵🏿|👰🏻|👰🏼|👰🏽|👰🏾|👰🏿|🤰🏻|🤰🏼|🤰🏽|🤰🏾|🤰🏿|🤱🏻|🤱🏼|🤱🏽|🤱🏾|🤱🏿|👼🏻|👼🏼|👼🏽|👼🏾|👼🏿|🎅🏻|🎅🏼|🎅🏽|🎅🏾|🎅🏿|🤶🏻|🤶🏼|🤶🏽|🤶🏾|🤶🏿|🦸🏻|🦸🏼|🦸🏽|🦸🏾|🦸🏿|🦹🏻|🦹🏼|🦹🏽|🦹🏾|🦹🏿|🧙🏻|🧙🏼|🧙🏽|🧙🏾|🧙🏿|🧚🏻|🧚🏼|🧚🏽|🧚🏾|🧚🏿|🧛🏻|🧛🏼|🧛🏽|🧛🏾|🧛🏿|🧜🏻|🧜🏼|🧜🏽|🧜🏾|🧜🏿|🧝🏻|🧝🏼|🧝🏽|🧝🏾|🧝🏿|💆🏻|💆🏼|💆🏽|💆🏾|💆🏿|💇🏻|💇🏼|💇🏽|💇🏾|💇🏿|🚶🏻|🚶🏼|🚶🏽|🚶🏾|🚶🏿|🧍🏻|🧍🏼|🧍🏽|🧍🏾|🧍🏿|🧎🏻|🧎🏼|🧎🏽|🧎🏾|🧎🏿|🏃🏻|🏃🏼|🏃🏽|🏃🏾|🏃🏿|💃🏻|💃🏼|💃🏽|💃🏾|💃🏿|🕺🏻|🕺🏼|🕺🏽|🕺🏾|🕺🏿|🕴🏻|🕴🏼|🕴🏽|🕴🏾|🕴🏿|🧖🏻|🧖🏼|🧖🏽|🧖🏾|🧖🏿|🧗🏻|🧗🏼|🧗🏽|🧗🏾|🧗🏿|🏇🏻|🏇🏼|🏇🏽|🏇🏾|🏇🏿|🏂🏻|🏂🏼|🏂🏽|🏂🏾|🏂🏿|🏌🏻|🏌🏼|🏌🏽|🏌🏾|🏌🏿|🏄🏻|🏄🏼|🏄🏽|🏄🏾|🏄🏿|🚣🏻|🚣🏼|🚣🏽|🚣🏾|🚣🏿|🏊🏻|🏊🏼|🏊🏽|🏊🏾|🏊🏿|🏋🏻|🏋🏼|🏋🏽|🏋🏾|🏋🏿|🚴🏻|🚴🏼|🚴🏽|🚴🏾|🚴🏿|🚵🏻|🚵🏼|🚵🏽|🚵🏾|🚵🏿|🤸🏻|🤸🏼|🤸🏽|🤸🏾|🤸🏿|🤽🏻|🤽🏼|🤽🏽|🤽🏾|🤽🏿|🤾🏻|🤾🏼|🤾🏽|🤾🏾|🤾🏿|🤹🏻|🤹🏼|🤹🏽|🤹🏾|🤹🏿|🧘🏻|🧘🏼|🧘🏽|🧘🏾|🧘🏿|🛀🏻|🛀🏼|🛀🏽|🛀🏾|🛀🏿|🛌🏻|🛌🏼|🛌🏽|🛌🏾|🛌🏿|👭🏻|👭🏼|👭🏽|👭🏾|👭🏿|👫🏻|👫🏼|👫🏽|👫🏾|👫🏿|👬🏻|👬🏼|👬🏽|👬🏾|👬🏿|💏🏻|💏🏼|💏🏽|💏🏾|💏🏿|💑🏻|💑🏼|💑🏽|💑🏾|💑🏿|#️⃣|0️⃣|1️⃣|2️⃣|3️⃣|4️⃣|5️⃣|6️⃣|7️⃣|8️⃣|9️⃣|✋🏻|✋🏼|✋🏽|✋🏾|✋🏿|✌🏻|✌🏼|✌🏽|✌🏾|✌🏿|☝🏻|☝🏼|☝🏽|☝🏾|☝🏿|✊🏻|✊🏼|✊🏽|✊🏾|✊🏿|✍🏻|✍🏼|✍🏽|✍🏾|✍🏿|⛹🏻|⛹🏼|⛹🏽|⛹🏾|⛹🏿|😀|😃|😄|😁|😆|😅|🤣|😂|🙂|🙃|😉|😊|😇|🥰|😍|🤩|😘|😗|😚|😙|🥲|😋|😛|😜|🤪|😝|🤑|🤗|🤭|🤫|🤔|🤐|🤨|😐|😑|😶|😏|😒|🙄|😬|🤥|😌|😔|😪|🤤|😴|😷|🤒|🤕|🤢|🤮|🤧|🥵|🥶|🥴|😵|🤯|🤠|🥳|🥸|😎|🤓|🧐|😕|😟|🙁|😮|😯|😲|😳|🥺|😦|😧|😨|😰|😥|😢|😭|😱|😖|😣|😞|😓|😩|😫|🥱|😤|😡|😠|🤬|😈|👿|💀|💩|🤡|👹|👺|👻|👽|👾|🤖|😺|😸|😹|😻|😼|😽|🙀|😿|😾|🙈|🙉|🙊|💋|💌|💘|💝|💖|💗|💓|💞|💕|💟|💔|🧡|💛|💚|💙|💜|🤎|🖤|🤍|💯|💢|💥|💫|💦|💨|🕳|💣|💬|🗨|🗯|💭|💤|👋|🤚|🖐|🖖|👌|🤌|🤏|🤞|🤟|🤘|🤙|👈|👉|👆|🖕|👇|👍|👎|👊|🤛|🤜|👏|🙌|👐|🤲|🤝|🙏|💅|🤳|💪|🦾|🦿|🦵|🦶|👂|🦻|👃|🧠|🫀|🫁|🦷|🦴|👀|👁|👅|👄|👶|🧒|👦|👧|🧑|👱|👨|🧔|👩|🧓|👴|👵|🙍|🙎|🙅|🙆|💁|🙋|🧏|🙇|🤦|🤷|👮|🕵|💂|🥷|👷|🤴|👸|👳|👲|🧕|🤵|👰|🤰|🤱|👼|🎅|🤶|🦸|🦹|🧙|🧚|🧛|🧜|🧝|🧞|🧟|💆|💇|🚶|🧍|🧎|🏃|💃|🕺|🕴|👯|🧖|🧗|🤺|🏇|🏂|🏌|🏄|🚣|🏊|🏋|🚴|🚵|🤸|🤼|🤽|🤾|🤹|🧘|🛀|🛌|👭|👫|👬|💏|💑|👪|🗣|👤|👥|🫂|👣|🦰|🦱|🦳|🦲|🐵|🐒|🦍|🦧|🐶|🐕|🦮|🐩|🐺|🦊|🦝|🐱|🐈|🦁|🐯|🐅|🐆|🐴|🐎|🦄|🦓|🦌|🦬|🐮|🐂|🐃|🐄|🐷|🐖|🐗|🐽|🐏|🐑|🐐|🐪|🐫|🦙|🦒|🐘|🦣|🦏|🦛|🐭|🐁|🐀|🐹|🐰|🐇|🐿|🦫|🦔|🦇|🐻|🐨|🐼|🦥|🦦|🦨|🦘|🦡|🐾|🦃|🐔|🐓|🐣|🐤|🐥|🐦|🐧|🕊|🦅|🦆|🦢|🦉|🦤|🪶|🦩|🦚|🦜|🐸|🐊|🐢|🦎|🐍|🐲|🐉|🦕|🦖|🐳|🐋|🐬|🦭|🐟|🐠|🐡|🦈|🐙|🐚|🐌|🦋|🐛|🐜|🐝|🪲|🐞|🦗|🪳|🕷|🕸|🦂|🦟|🪰|🪱|🦠|💐|🌸|💮|🏵|🌹|🥀|🌺|🌻|🌼|🌷|🌱|🪴|🌲|🌳|🌴|🌵|🌾|🌿|🍀|🍁|🍂|🍃|🍇|🍈|🍉|🍊|🍋|🍌|🍍|🥭|🍎|🍏|🍐|🍑|🍒|🍓|🫐|🥝|🍅|🫒|🥥|🥑|🍆|🥔|🥕|🌽|🌶|🫑|🥒|🥬|🥦|🧄|🧅|🍄|🥜|🌰|🍞|🥐|🥖|🫓|🥨|🥯|🥞|🧇|🧀|🍖|🍗|🥩|🥓|🍔|🍟|🍕|🌭|🥪|🌮|🌯|🫔|🥙|🧆|🥚|🍳|🥘|🍲|🫕|🥣|🥗|🍿|🧈|🧂|🥫|🍱|🍘|🍙|🍚|🍛|🍜|🍝|🍠|🍢|🍣|🍤|🍥|🥮|🍡|🥟|🥠|🥡|🦀|🦞|🦐|🦑|🦪|🍦|🍧|🍨|🍩|🍪|🎂|🍰|🧁|🥧|🍫|🍬|🍭|🍮|🍯|🍼|🥛|🫖|🍵|🍶|🍾|🍷|🍸|🍹|🍺|🍻|🥂|🥃|🥤|🧋|🧃|🧉|🧊|🥢|🍽|🍴|🥄|🔪|🏺|🌍|🌎|🌏|🌐|🗺|🗾|🧭|🏔|🌋|🗻|🏕|🏖|🏜|🏝|🏞|🏟|🏛|🏗|🧱|🪨|🪵|🛖|🏘|🏚|🏠|🏡|🏢|🏣|🏤|🏥|🏦|🏨|🏩|🏪|🏫|🏬|🏭|🏯|🏰|💒|🗼|🗽|🕌|🛕|🕍|🕋|🌁|🌃|🏙|🌄|🌅|🌆|🌇|🌉|🎠|🎡|🎢|💈|🎪|🚂|🚃|🚄|🚅|🚆|🚇|🚈|🚉|🚊|🚝|🚞|🚋|🚌|🚍|🚎|🚐|🚑|🚒|🚓|🚔|🚕|🚖|🚗|🚘|🚙|🛻|🚚|🚛|🚜|🏎|🏍|🛵|🦽|🦼|🛺|🚲|🛴|🛹|🛼|🚏|🛣|🛤|🛢|🚨|🚥|🚦|🛑|🚧|🛶|🚤|🛳|🛥|🚢|🛩|🛫|🛬|🪂|💺|🚁|🚟|🚠|🚡|🛰|🚀|🛸|🛎|🧳|🕰|🕛|🕧|🕐|🕜|🕑|🕝|🕒|🕞|🕓|🕟|🕔|🕠|🕕|🕡|🕖|🕢|🕗|🕣|🕘|🕤|🕙|🕥|🕚|🕦|🌑|🌒|🌓|🌔|🌕|🌖|🌗|🌘|🌙|🌚|🌛|🌜|🌡|🌝|🌞|🪐|🌟|🌠|🌌|🌤|🌥|🌦|🌧|🌨|🌩|🌪|🌫|🌬|🌀|🌈|🌂|🔥|💧|🌊|🎃|🎄|🎆|🎇|🧨|🎈|🎉|🎊|🎋|🎍|🎎|🎏|🎐|🎑|🧧|🎀|🎁|🎗|🎟|🎫|🎖|🏆|🏅|🥇|🥈|🥉|🥎|🏀|🏐|🏈|🏉|🎾|🥏|🎳|🏏|🏑|🏒|🥍|🏓|🏸|🥊|🥋|🥅|🎣|🤿|🎽|🎿|🛷|🥌|🎯|🪀|🪁|🎱|🔮|🪄|🧿|🎮|🕹|🎰|🎲|🧩|🧸|🪅|🪆|🃏|🀄|🎴|🎭|🖼|🎨|🧵|🪡|🧶|🪢|👓|🕶|🥽|🥼|🦺|👔|👕|👖|🧣|🧤|🧥|🧦|👗|👘|🥻|🩱|🩲|🩳|👙|👚|👛|👜|👝|🛍|🎒|🩴|👞|👟|🥾|🥿|👠|👡|🩰|👢|👑|👒|🎩|🎓|🧢|🪖|📿|💄|💍|💎|🔇|🔈|🔉|🔊|📢|📣|📯|🔔|🔕|🎼|🎵|🎶|🎙|🎚|🎛|🎤|🎧|📻|🎷|🪗|🎸|🎹|🎺|🎻|🪕|🥁|🪘|📱|📲|📞|📟|📠|🔋|🔌|💻|🖥|🖨|🖱|🖲|💽|💾|💿|📀|🧮|🎥|🎞|📽|🎬|📺|📷|📸|📹|📼|🔍|🔎|🕯|💡|🔦|🏮|🪔|📔|📕|📖|📗|📘|📙|📚|📓|📒|📃|📜|📄|📰|🗞|📑|🔖|🏷|💰|🪙|💴|💵|💶|💷|💸|💳|🧾|💹|📧|📨|📩|📤|📥|📦|📫|📪|📬|📭|📮|🗳|🖋|🖊|🖌|🖍|📝|💼|📁|📂|🗂|📅|📆|🗒|🗓|📇|📈|📉|📊|📋|📌|📍|📎|🖇|📏|📐|🗃|🗄|🗑|🔒|🔓|🔏|🔐|🔑|🗝|🔨|🪓|🛠|🗡|🔫|🪃|🏹|🛡|🪚|🔧|🪛|🔩|🗜|🦯|🔗|🪝|🧰|🧲|🪜|🧪|🧫|🧬|🔬|🔭|📡|💉|🩸|💊|🩹|🩺|🚪|🛗|🪞|🪟|🛏|🛋|🪑|🚽|🪠|🚿|🛁|🪤|🪒|🧴|🧷|🧹|🧺|🧻|🪣|🧼|🪥|🧽|🧯|🛒|🚬|🪦|🗿|🪧|🏧|🚮|🚰|🚹|🚺|🚻|🚼|🚾|🛂|🛃|🛄|🛅|🚸|🚫|🚳|🚭|🚯|🚱|🚷|📵|🔞|🔃|🔄|🔙|🔚|🔛|🔜|🔝|🛐|🕉|🕎|🔯|🔀|🔁|🔂|🔼|🔽|🎦|🔅|🔆|📶|📳|📴|💱|💲|🔱|📛|🔰|🔟|🔠|🔡|🔢|🔣|🔤|🅰|🆎|🅱|🆑|🆒|🆓|🆔|🆕|🆖|🅾|🆗|🅿|🆘|🆙|🆚|🈁|🈂|🈷|🈶|🈯|🉐|🈹|🈚|🈲|🉑|🈸|🈴|🈳|🈺|🈵|🔴|🟠|🟡|🟢|🔵|🟣|🟤|🟥|🟧|🟨|🟩|🟦|🟪|🟫|🔶|🔷|🔸|🔹|🔺|🔻|💠|🔘|🔳|🔲|🏁|🚩|🎌|🏴|🏳|🏻|🏼|🏽|🏾|🏿|☺|☹|☠|❣|❤|✋|✌|☝|✊|✍|⛷|⛹|☘|☕|⛰|⛪|⛩|⛲|⛺|♨|⛽|⚓|⛵|⛴|✈|⌛|⏳|⌚|⏰|⏱|⏲|☀|⭐|☁|⛅|⛈|☂|☔|⛱|⚡|❄|☃|⛄|☄|✨|⚽|⚾|⛳|⛸|♠|♥|♦|♣|♟|⛑|☎|⌨|✉|✏|✒|✂|⛏|⚒|⚔|⚙|⚖|⛓|⚗|⚰|⚱|♿|⚠|⛔|☢|☣|⬆|↗|➡|↘|⬇|↙|⬅|↖|↕|↔|↩|↪|⤴|⤵|⚛|✡|☸|☯|✝|☦|☪|☮|♈|♉|♊|♋|♌|♍|♎|♏|♐|♑|♒|♓|⛎|▶|⏩|⏭|⏯|◀|⏪|⏮|⏫|⏬|⏸|⏹|⏺|⏏|♀|♂|⚧|✖|➕|➖|➗|♾|‼|⁉|❓|❔|❕|❗|〰|⚕|♻|⚜|⭕|✅|☑|✔|❌|❎|➰|➿|〽|✳|✴|❇|©|®|™|ℹ|Ⓜ|㊗|㊙|⚫|⚪|⬛|⬜|◼|◻|◾|◽|▪|▫)`
/*compile the pattern string into a regex*/
let emoRegex = new RegExp(emojiPattern, "g");
/*count of emojis*/
let emoCount = [..."👶🏻👦🏻👧🏻👨🏻👩🏻👱🏻♀️👱🏻👴🏻👵🏻👲🏻👳🏻♀️👳🏻👮🏻♀️👮🏻👷🏻♀️👷🏻💂🏻♀️💂🏻🕵🏻♀️👩🏻⚕️👨🏻⚕️👩🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾".matchAll(emoRegex)].length
console.log(emoCount) //37
/*modifying the pattern to count other characters too*/
let generalCounter = new RegExp(emojiPattern+"|.", "g") //emoji or regular character
let allCount = [..."$%^ other stuff equalling 28👶👦🏻👧🏻👨🏻👩🏻👱🏻♀️👱🏻👴🏻👵🏻👲🏻👳🏻♀️👳🏻👮🏻♀️👮🏻👷🏻♀️👷🏻💂🏻♀️💂🏻🕵🏻♀️👩🏻⚕️👨🏻⚕️👩🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾".matchAll(generalCounter)].length
console.log(allCount) //28+37 = 65
As you can see from the below example, this is to do with unicode encoding,
There's some great resources such as the one I took this example from.
https://blog.jonnew.com/posts/poo-dot-length-equals-two
console.log("👩❤️💋👩".length === 11);
For anyone interested, I had a similar problem where I wanted to count the length of an emoji at the end of a string.
This is the solution I came up with:
var emoji = new RegExp('(\\p{Extended_Pictographic})((\u200D\\p{Extended_Pictographic})*)$', 'u');
var testStrings = ['👨👩👧', '😂', '🌲'];
for(var string = 0; string < testStrings.length; string++){
var match = testStrings[string].match(emoji);
var chars = match == null ? 0 : match[0].length;
console.log(testStrings[string] + ': ' + chars);
}
Explanation: \\p{Extended_Pictographic} matches an emoji like 😂, consisting of two characters. Emojis like 👨👩👧 consists of 4 emojis (👨, 👩, 👧,👦) combined by a zero width joiner (\u200D).
The regex matches any emoji at the end ($). If there is a match the length is counted. I am sure it could be adopted for your use-case by matching all emojis in a given string and then subtracting the surplus. It's not a complete implementation for your particular question but I hope this gets you on the right track.
use lodash toArray method
console.log(_.toArray("👨👩👧").length); // 1
console.log(_.toArray("👨👩👧🧍♂️👩👧👧").length); // 3
Check here for Codesandbox
I suggest using the runes package to accomplish correct multi-byte string conversions cause else you will get more issues if using reducers and more to reverse strings for example.
Take a look at this great small package: runes
I understand that JavaScript (the language that implements the spec) is case sensitive. For example, variable names:
let myVar = 1
let MyVar = 2 // different :)
I haven't been able to find anything in the spec itself that indicates that this is a requirement, so I'm not sure if that was just a design decision independent of the spec.
I think I found something that specifies this. Names and Keywords says:
Two IdentifierNames that are canonically equivalent according to the Unicode standard are not equal unless, after replacement of each UnicodeEscapeSequence, they are represented by the exact same sequence of code points.
Since uppercase and lowercase letters have different code points, identifiers with different case are not equal.
Yes it is case sensitive but generally JavaScript developers follow camel case convention.
I've a little problem.
I'm using NodeJS as backend. Now, an user has a field "biography", where the user can write something about himself.
Suppose that this field has 220 maxlength, and suppose this as input:
👶🏻👦🏻👧🏻👨🏻👩🏻👱🏻♀️👱🏻👴🏻👵🏻👲🏻👳🏻♀️👳🏻👮🏻♀️👮🏻👷🏻♀️👷🏻💂🏻♀️💂🏻🕵🏻♀️👩🏻⚕️👨🏻⚕️👩🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾
As you can see there aren't 220 emojis (there are 37 emojis), but if I do in my nodejs server
console.log(bio.length)
where bio is the input text, I got 221. How could I "parse" the string input to get the correct length? Is it a problem about unicode?
SOLVED
I used this library: https://github.com/orling/grapheme-splitter
I tried that:
var Grapheme = require('grapheme-splitter');
var splitter = new Grapheme();
console.log(splitter.splitGraphemes(bio).length);
and the length is 37. It works very well!
str.length gives the count of UTF-16 units.
Unicode-proof way to get string length in codepoints (in characters) is [...str].length as iterable protocol splits the string to codepoints.
If we need the length in graphemes (grapheme clusters), we have these native ways:
a. Unicode property escapes in RegExp. See for example: Unicode-aware version of \w or Matching emoji.
b. Intl.Segmenter — coming soon, probably in ES2021. Can be tested with a flag in the last V8 versions (realization was synced with the last spec in V8 86). Unflagged (shipped) in V8 87.
See also:
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
What every JavaScript developer should know about Unicode
JavaScript has a Unicode problem
Unicode-aware regular expressions in ES2015
ES6 Strings (and Unicode, ❤) in Depth
JavaScript for impatient programmers. Unicode – a brief introduction
TL;DR there are solutions, but they don’t work in every case. Unicode can feel like a dark art.
There seems to be limitations in various solutions I have seen presented, with the issue going beyond emojis and covering other characters in the Unicode range. Consider é can be stored as é or e + ‘, if using combing characters. This can even lead to two strings that look the same not being equal. Also note, in certain cases a single emoji can be 11 characters when stored and as a result 22 bytes, assuming UTF16.
The way this is handled and how characters are combined, or displayed, can even vary between browsers and operating systems. So, while you may think you cracked it, there is a risk another environment breaks this. Be sure to test where it matters.
Now, there is the front-end vs back-end problem: you solved the character count problem so it works well for human users, now your single emoji blows right past the allocated field size in the database. Less of an issue with databases such as mongo, but can be one with SQL databases, where field allocation was conservative. This means how you solve your problem will depend where the hardest limitation comes in.
Note, that a basic solution does involve converting a string to an array and getting the length, accepting limitations:
Array.from(str)
This will fall apart when characters are combined and dealing with astral planes.
A few high level approaches, that take into account limitations:
use approaches that solve the front-end issue, as best as possible, and then ensure storage issues are resolved
be more conservative with the advertised front-end limits, if the database or other storage can’t be adjusted
limit the character types that can be entered
clearly indicate limitations of the length calculation
Additionally, given the complexity of the issue it may be worth seeing if there is a popular JS library that already deals with this? I did not find one at the time of writing. Hopefully this is something that would become core to Javascript at some point.
Other pages to read:
https://blog.jonnew.com/posts/poo-dot-length-equals-two
https://mathiasbynens.be/notes/javascript-unicode
https://www.contentful.com/blog/2016/12/06/unicode-javascript-and-the-emoji-family/
https://dmitripavlutin.com/what-every-javascript-developer-should-know-about-unicode/
I answered to a similar question here
But basically, here it is :
'👍'.match(/./gu).length == 1
As :
'👍'.length == 2
More precision in my original post
function fancyCount2(str){
const joiner = "\u{200D}";
const split = str.split(joiner);
let count = 0;
for(const s of split){
//removing the variation selectors
const num = Array.from(s.split(/[\ufe00-\ufe0f]/).join("")).length;
count += num;
}
//assuming the joiners are used appropriately
return count / split.length;
}
With a regex that can parse emojis, this can be done easily and without the use of external libraries. Please see the code snippets for examples. 👷🏻♀️
Note that grapheme-splitter as suggested in the question will overcount and split apart compound emojis that contain other emojis, such as this one: 🧑🏻🤝🧑🏻. This is reported as three distinct "graphemes", 🧑🏻 and 🤝 and 🧑🏻
Here we are using the 'compact', literal version so it'll fit, but there's a safe, long version that uses Unicode escapes as well.
For more info on the regex see also this answer.
/*the pattern (compact version)*/
var emojiPattern = String.raw`(?:🧑🏻❤️💋🧑🏼|🧑🏻❤️💋🧑🏽|🧑🏻❤️💋🧑🏾|🧑🏻❤️💋🧑🏿|🧑🏼❤️💋🧑🏻|🧑🏼❤️💋🧑🏽|🧑🏼❤️💋🧑🏾|🧑🏼❤️💋🧑🏿|🧑🏽❤️💋🧑🏻|🧑🏽❤️💋🧑🏼|🧑🏽❤️💋🧑🏾|🧑🏽❤️💋🧑🏿|🧑🏾❤️💋🧑🏻|🧑🏾❤️💋🧑🏼|🧑🏾❤️💋🧑🏽|🧑🏾❤️💋🧑🏿|🧑🏿❤️💋🧑🏻|🧑🏿❤️💋🧑🏼|🧑🏿❤️💋🧑🏽|🧑🏿❤️💋🧑🏾|👩🏻❤️💋👨🏻|👩🏻❤️💋👨🏼|👩🏻❤️💋👨🏽|👩🏻❤️💋👨🏾|👩🏻❤️💋👨🏿|👩🏼❤️💋👨🏻|👩🏼❤️💋👨🏼|👩🏼❤️💋👨🏽|👩🏼❤️💋👨🏾|👩🏼❤️💋👨🏿|👩🏽❤️💋👨🏻|👩🏽❤️💋👨🏼|👩🏽❤️💋👨🏽|👩🏽❤️💋👨🏾|👩🏽❤️💋👨🏿|👩🏾❤️💋👨🏻|👩🏾❤️💋👨🏼|👩🏾❤️💋👨🏽|👩🏾❤️💋👨🏾|👩🏾❤️💋👨🏿|👩🏿❤️💋👨🏻|👩🏿❤️💋👨🏼|👩🏿❤️💋👨🏽|👩🏿❤️💋👨🏾|👩🏿❤️💋👨🏿|👨🏻❤️💋👨🏻|👨🏻❤️💋👨🏼|👨🏻❤️💋👨🏽|👨🏻❤️💋👨🏾|👨🏻❤️💋👨🏿|👨🏼❤️💋👨🏻|👨🏼❤️💋👨🏼|👨🏼❤️💋👨🏽|👨🏼❤️💋👨🏾|👨🏼❤️💋👨🏿|👨🏽❤️💋👨🏻|👨🏽❤️💋👨🏼|👨🏽❤️💋👨🏽|👨🏽❤️💋👨🏾|👨🏽❤️💋👨🏿|👨🏾❤️💋👨🏻|👨🏾❤️💋👨🏼|👨🏾❤️💋👨🏽|👨🏾❤️💋👨🏾|👨🏾❤️💋👨🏿|👨🏿❤️💋👨🏻|👨🏿❤️💋👨🏼|👨🏿❤️💋👨🏽|👨🏿❤️💋👨🏾|👨🏿❤️💋👨🏿|👩🏻❤️💋👩🏻|👩🏻❤️💋👩🏼|👩🏻❤️💋👩🏽|👩🏻❤️💋👩🏾|👩🏻❤️💋👩🏿|👩🏼❤️💋👩🏻|👩🏼❤️💋👩🏼|👩🏼❤️💋👩🏽|👩🏼❤️💋👩🏾|👩🏼❤️💋👩🏿|👩🏽❤️💋👩🏻|👩🏽❤️💋👩🏼|👩🏽❤️💋👩🏽|👩🏽❤️💋👩🏾|👩🏽❤️💋👩🏿|👩🏾❤️💋👩🏻|👩🏾❤️💋👩🏼|👩🏾❤️💋👩🏽|👩🏾❤️💋👩🏾|👩🏾❤️💋👩🏿|👩🏿❤️💋👩🏻|👩🏿❤️💋👩🏼|👩🏿❤️💋👩🏽|👩🏿❤️💋👩🏾|👩🏿❤️💋👩🏿|🏴|🏴|🏴|🧑🏻🤝🧑🏻|🧑🏻🤝🧑🏼|🧑🏻🤝🧑🏽|🧑🏻🤝🧑🏾|🧑🏻🤝🧑🏿|🧑🏼🤝🧑🏻|🧑🏼🤝🧑🏼|🧑🏼🤝🧑🏽|🧑🏼🤝🧑🏾|🧑🏼🤝🧑🏿|🧑🏽🤝🧑🏻|🧑🏽🤝🧑🏼|🧑🏽🤝🧑🏽|🧑🏽🤝🧑🏾|🧑🏽🤝🧑🏿|🧑🏾🤝🧑🏻|🧑🏾🤝🧑🏼|🧑🏾🤝🧑🏽|🧑🏾🤝🧑🏾|🧑🏾🤝🧑🏿|🧑🏿🤝🧑🏻|🧑🏿🤝🧑🏼|🧑🏿🤝🧑🏽|🧑🏿🤝🧑🏾|🧑🏿🤝🧑🏿|👩🏻🤝👩🏼|👩🏻🤝👩🏽|👩🏻🤝👩🏾|👩🏻🤝👩🏿|👩🏼🤝👩🏻|👩🏼🤝👩🏽|👩🏼🤝👩🏾|👩🏼🤝👩🏿|👩🏽🤝👩🏻|👩🏽🤝👩🏼|👩🏽🤝👩🏾|👩🏽🤝👩🏿|👩🏾🤝👩🏻|👩🏾🤝👩🏼|👩🏾🤝👩🏽|👩🏾🤝👩🏿|👩🏿🤝👩🏻|👩🏿🤝👩🏼|👩🏿🤝👩🏽|👩🏿🤝👩🏾|👩🏻🤝👨🏼|👩🏻🤝👨🏽|👩🏻🤝👨🏾|👩🏻🤝👨🏿|👩🏼🤝👨🏻|👩🏼🤝👨🏽|👩🏼🤝👨🏾|👩🏼🤝👨🏿|👩🏽🤝👨🏻|👩🏽🤝👨🏼|👩🏽🤝👨🏾|👩🏽🤝👨🏿|👩🏾🤝👨🏻|👩🏾🤝👨🏼|👩🏾🤝👨🏽|👩🏾🤝👨🏿|👩🏿🤝👨🏻|👩🏿🤝👨🏼|👩🏿🤝👨🏽|👩🏿🤝👨🏾|👨🏻🤝👨🏼|👨🏻🤝👨🏽|👨🏻🤝👨🏾|👨🏻🤝👨🏿|👨🏼🤝👨🏻|👨🏼🤝👨🏽|👨🏼🤝👨🏾|👨🏼🤝👨🏿|👨🏽🤝👨🏻|👨🏽🤝👨🏼|👨🏽🤝👨🏾|👨🏽🤝👨🏿|👨🏾🤝👨🏻|👨🏾🤝👨🏼|👨🏾🤝👨🏽|👨🏾🤝👨🏿|👨🏿🤝👨🏻|👨🏿🤝👨🏼|👨🏿🤝👨🏽|👨🏿🤝👨🏾|🧑🏻❤️🧑🏼|🧑🏻❤️🧑🏽|🧑🏻❤️🧑🏾|🧑🏻❤️🧑🏿|🧑🏼❤️🧑🏻|🧑🏼❤️🧑🏽|🧑🏼❤️🧑🏾|🧑🏼❤️🧑🏿|🧑🏽❤️🧑🏻|🧑🏽❤️🧑🏼|🧑🏽❤️🧑🏾|🧑🏽❤️🧑🏿|🧑🏾❤️🧑🏻|🧑🏾❤️🧑🏼|🧑🏾❤️🧑🏽|🧑🏾❤️🧑🏿|🧑🏿❤️🧑🏻|🧑🏿❤️🧑🏼|🧑🏿❤️🧑🏽|🧑🏿❤️🧑🏾|👩🏻❤️👨🏻|👩🏻❤️👨🏼|👩🏻❤️👨🏽|👩🏻❤️👨🏾|👩🏻❤️👨🏿|👩🏼❤️👨🏻|👩🏼❤️👨🏼|👩🏼❤️👨🏽|👩🏼❤️👨🏾|👩🏼❤️👨🏿|👩🏽❤️👨🏻|👩🏽❤️👨🏼|👩🏽❤️👨🏽|👩🏽❤️👨🏾|👩🏽❤️👨🏿|👩🏾❤️👨🏻|👩🏾❤️👨🏼|👩🏾❤️👨🏽|👩🏾❤️👨🏾|👩🏾❤️👨🏿|👩🏿❤️👨🏻|👩🏿❤️👨🏼|👩🏿❤️👨🏽|👩🏿❤️👨🏾|👩🏿❤️👨🏿|👨🏻❤️👨🏻|👨🏻❤️👨🏼|👨🏻❤️👨🏽|👨🏻❤️👨🏾|👨🏻❤️👨🏿|👨🏼❤️👨🏻|👨🏼❤️👨🏼|👨🏼❤️👨🏽|👨🏼❤️👨🏾|👨🏼❤️👨🏿|👨🏽❤️👨🏻|👨🏽❤️👨🏼|👨🏽❤️👨🏽|👨🏽❤️👨🏾|👨🏽❤️👨🏿|👨🏾❤️👨🏻|👨🏾❤️👨🏼|👨🏾❤️👨🏽|👨🏾❤️👨🏾|👨🏾❤️👨🏿|👨🏿❤️👨🏻|👨🏿❤️👨🏼|👨🏿❤️👨🏽|👨🏿❤️👨🏾|👨🏿❤️👨🏿|👩🏻❤️👩🏻|👩🏻❤️👩🏼|👩🏻❤️👩🏽|👩🏻❤️👩🏾|👩🏻❤️👩🏿|👩🏼❤️👩🏻|👩🏼❤️👩🏼|👩🏼❤️👩🏽|👩🏼❤️👩🏾|👩🏼❤️👩🏿|👩🏽❤️👩🏻|👩🏽❤️👩🏼|👩🏽❤️👩🏽|👩🏽❤️👩🏾|👩🏽❤️👩🏿|👩🏾❤️👩🏻|👩🏾❤️👩🏼|👩🏾❤️👩🏽|👩🏾❤️👩🏾|👩🏾❤️👩🏿|👩🏿❤️👩🏻|👩🏿❤️👩🏼|👩🏿❤️👩🏽|👩🏿❤️👩🏾|👩🏿❤️👩🏿|👩❤️💋👨|👨❤️💋👨|👩❤️💋👩|👨👩👧👦|👨👩👦👦|👨👩👧👧|👨👨👧👦|👨👨👦👦|👨👨👧👧|👩👩👧👦|👩👩👦👦|👩👩👧👧|🧑🤝🧑|👩❤️👨|👨❤️👨|👩❤️👩|👨👩👦|👨👩👧|👨👨👦|👨👨👧|👩👩👦|👩👩👧|👨👦👦|👨👧👦|👨👧👧|👩👦👦|👩👧👦|👩👧👧|👁️🗨️|🧔🏻♂️|🧔🏼♂️|🧔🏽♂️|🧔🏾♂️|🧔🏿♂️|🧔🏻♀️|🧔🏼♀️|🧔🏽♀️|🧔🏾♀️|🧔🏿♀️|👨🏻🦰|👨🏼🦰|👨🏽🦰|👨🏾🦰|👨🏿🦰|👨🏻🦱|👨🏼🦱|👨🏽🦱|👨🏾🦱|👨🏿🦱|👨🏻🦳|👨🏼🦳|👨🏽🦳|👨🏾🦳|👨🏿🦳|👨🏻🦲|👨🏼🦲|👨🏽🦲|👨🏾🦲|👨🏿🦲|👩🏻🦰|👩🏼🦰|👩🏽🦰|👩🏾🦰|👩🏿🦰|🧑🏻🦰|🧑🏼🦰|🧑🏽🦰|🧑🏾🦰|🧑🏿🦰|👩🏻🦱|👩🏼🦱|👩🏽🦱|👩🏾🦱|👩🏿🦱|🧑🏻🦱|🧑🏼🦱|🧑🏽🦱|🧑🏾🦱|🧑🏿🦱|👩🏻🦳|👩🏼🦳|👩🏽🦳|👩🏾🦳|👩🏿🦳|🧑🏻🦳|🧑🏼🦳|🧑🏽🦳|🧑🏾🦳|🧑🏿🦳|👩🏻🦲|👩🏼🦲|👩🏽🦲|👩🏾🦲|👩🏿🦲|🧑🏻🦲|🧑🏼🦲|🧑🏽🦲|🧑🏾🦲|🧑🏿🦲|👱🏻♀️|👱🏼♀️|👱🏽♀️|👱🏾♀️|👱🏿♀️|👱🏻♂️|👱🏼♂️|👱🏽♂️|👱🏾♂️|👱🏿♂️|🙍🏻♂️|🙍🏼♂️|🙍🏽♂️|🙍🏾♂️|🙍🏿♂️|🙍🏻♀️|🙍🏼♀️|🙍🏽♀️|🙍🏾♀️|🙍🏿♀️|🙎🏻♂️|🙎🏼♂️|🙎🏽♂️|🙎🏾♂️|🙎🏿♂️|🙎🏻♀️|🙎🏼♀️|🙎🏽♀️|🙎🏾♀️|🙎🏿♀️|🙅🏻♂️|🙅🏼♂️|🙅🏽♂️|🙅🏾♂️|🙅🏿♂️|🙅🏻♀️|🙅🏼♀️|🙅🏽♀️|🙅🏾♀️|🙅🏿♀️|🙆🏻♂️|🙆🏼♂️|🙆🏽♂️|🙆🏾♂️|🙆🏿♂️|🙆🏻♀️|🙆🏼♀️|🙆🏽♀️|🙆🏾♀️|🙆🏿♀️|💁🏻♂️|💁🏼♂️|💁🏽♂️|💁🏾♂️|💁🏿♂️|💁🏻♀️|💁🏼♀️|💁🏽♀️|💁🏾♀️|💁🏿♀️|🙋🏻♂️|🙋🏼♂️|🙋🏽♂️|🙋🏾♂️|🙋🏿♂️|🙋🏻♀️|🙋🏼♀️|🙋🏽♀️|🙋🏾♀️|🙋🏿♀️|🧏🏻♂️|🧏🏼♂️|🧏🏽♂️|🧏🏾♂️|🧏🏿♂️|🧏🏻♀️|🧏🏼♀️|🧏🏽♀️|🧏🏾♀️|🧏🏿♀️|🙇🏻♂️|🙇🏼♂️|🙇🏽♂️|🙇🏾♂️|🙇🏿♂️|🙇🏻♀️|🙇🏼♀️|🙇🏽♀️|🙇🏾♀️|🙇🏿♀️|🤦🏻♂️|🤦🏼♂️|🤦🏽♂️|🤦🏾♂️|🤦🏿♂️|🤦🏻♀️|🤦🏼♀️|🤦🏽♀️|🤦🏾♀️|🤦🏿♀️|🤷🏻♂️|🤷🏼♂️|🤷🏽♂️|🤷🏾♂️|🤷🏿♂️|🤷🏻♀️|🤷🏼♀️|🤷🏽♀️|🤷🏾♀️|🤷🏿♀️|🧑🏻⚕️|🧑🏼⚕️|🧑🏽⚕️|🧑🏾⚕️|🧑🏿⚕️|👨🏻⚕️|👨🏼⚕️|👨🏽⚕️|👨🏾⚕️|👨🏿⚕️|👩🏻⚕️|👩🏼⚕️|👩🏽⚕️|👩🏾⚕️|👩🏿⚕️|🧑🏻🎓|🧑🏼🎓|🧑🏽🎓|🧑🏾🎓|🧑🏿🎓|👨🏻🎓|👨🏼🎓|👨🏽🎓|👨🏾🎓|👨🏿🎓|👩🏻🎓|👩🏼🎓|👩🏽🎓|👩🏾🎓|👩🏿🎓|🧑🏻🏫|🧑🏼🏫|🧑🏽🏫|🧑🏾🏫|🧑🏿🏫|👨🏻🏫|👨🏼🏫|👨🏽🏫|👨🏾🏫|👨🏿🏫|👩🏻🏫|👩🏼🏫|👩🏽🏫|👩🏾🏫|👩🏿🏫|🧑🏻⚖️|🧑🏼⚖️|🧑🏽⚖️|🧑🏾⚖️|🧑🏿⚖️|👨🏻⚖️|👨🏼⚖️|👨🏽⚖️|👨🏾⚖️|👨🏿⚖️|👩🏻⚖️|👩🏼⚖️|👩🏽⚖️|👩🏾⚖️|👩🏿⚖️|🧑🏻🌾|🧑🏼🌾|🧑🏽🌾|🧑🏾🌾|🧑🏿🌾|👨🏻🌾|👨🏼🌾|👨🏽🌾|👨🏾🌾|👨🏿🌾|👩🏻🌾|👩🏼🌾|👩🏽🌾|👩🏾🌾|👩🏿🌾|🧑🏻🍳|🧑🏼🍳|🧑🏽🍳|🧑🏾🍳|🧑🏿🍳|👨🏻🍳|👨🏼🍳|👨🏽🍳|👨🏾🍳|👨🏿🍳|👩🏻🍳|👩🏼🍳|👩🏽🍳|👩🏾🍳|👩🏿🍳|🧑🏻🔧|🧑🏼🔧|🧑🏽🔧|🧑🏾🔧|🧑🏿🔧|👨🏻🔧|👨🏼🔧|👨🏽🔧|👨🏾🔧|👨🏿🔧|👩🏻🔧|👩🏼🔧|👩🏽🔧|👩🏾🔧|👩🏿🔧|🧑🏻🏭|🧑🏼🏭|🧑🏽🏭|🧑🏾🏭|🧑🏿🏭|👨🏻🏭|👨🏼🏭|👨🏽🏭|👨🏾🏭|👨🏿🏭|👩🏻🏭|👩🏼🏭|👩🏽🏭|👩🏾🏭|👩🏿🏭|🧑🏻💼|🧑🏼💼|🧑🏽💼|🧑🏾💼|🧑🏿💼|👨🏻💼|👨🏼💼|👨🏽💼|👨🏾💼|👨🏿💼|👩🏻💼|👩🏼💼|👩🏽💼|👩🏾💼|👩🏿💼|🧑🏻🔬|🧑🏼🔬|🧑🏽🔬|🧑🏾🔬|🧑🏿🔬|👨🏻🔬|👨🏼🔬|👨🏽🔬|👨🏾🔬|👨🏿🔬|👩🏻🔬|👩🏼🔬|👩🏽🔬|👩🏾🔬|👩🏿🔬|🧑🏻💻|🧑🏼💻|🧑🏽💻|🧑🏾💻|🧑🏿💻|👨🏻💻|👨🏼💻|👨🏽💻|👨🏾💻|👨🏿💻|👩🏻💻|👩🏼💻|👩🏽💻|👩🏾💻|👩🏿💻|🧑🏻🎤|🧑🏼🎤|🧑🏽🎤|🧑🏾🎤|🧑🏿🎤|👨🏻🎤|👨🏼🎤|👨🏽🎤|👨🏾🎤|👨🏿🎤|👩🏻🎤|👩🏼🎤|👩🏽🎤|👩🏾🎤|👩🏿🎤|🧑🏻🎨|🧑🏼🎨|🧑🏽🎨|🧑🏾🎨|🧑🏿🎨|👨🏻🎨|👨🏼🎨|👨🏽🎨|👨🏾🎨|👨🏿🎨|👩🏻🎨|👩🏼🎨|👩🏽🎨|👩🏾🎨|👩🏿🎨|🧑🏻✈️|🧑🏼✈️|🧑🏽✈️|🧑🏾✈️|🧑🏿✈️|👨🏻✈️|👨🏼✈️|👨🏽✈️|👨🏾✈️|👨🏿✈️|👩🏻✈️|👩🏼✈️|👩🏽✈️|👩🏾✈️|👩🏿✈️|🧑🏻🚀|🧑🏼🚀|🧑🏽🚀|🧑🏾🚀|🧑🏿🚀|👨🏻🚀|👨🏼🚀|👨🏽🚀|👨🏾🚀|👨🏿🚀|👩🏻🚀|👩🏼🚀|👩🏽🚀|👩🏾🚀|👩🏿🚀|🧑🏻🚒|🧑🏼🚒|🧑🏽🚒|🧑🏾🚒|🧑🏿🚒|👨🏻🚒|👨🏼🚒|👨🏽🚒|👨🏾🚒|👨🏿🚒|👩🏻🚒|👩🏼🚒|👩🏽🚒|👩🏾🚒|👩🏿🚒|👮🏻♂️|👮🏼♂️|👮🏽♂️|👮🏾♂️|👮🏿♂️|👮🏻♀️|👮🏼♀️|👮🏽♀️|👮🏾♀️|👮🏿♀️|🕵🏻♂️|🕵🏼♂️|🕵🏽♂️|🕵🏾♂️|🕵🏿♂️|🕵🏻♀️|🕵🏼♀️|🕵🏽♀️|🕵🏾♀️|🕵🏿♀️|💂🏻♂️|💂🏼♂️|💂🏽♂️|💂🏾♂️|💂🏿♂️|💂🏻♀️|💂🏼♀️|💂🏽♀️|💂🏾♀️|💂🏿♀️|👷🏻♂️|👷🏼♂️|👷🏽♂️|👷🏾♂️|👷🏿♂️|👷🏻♀️|👷🏼♀️|👷🏽♀️|👷🏾♀️|👷🏿♀️|👳🏻♂️|👳🏼♂️|👳🏽♂️|👳🏾♂️|👳🏿♂️|👳🏻♀️|👳🏼♀️|👳🏽♀️|👳🏾♀️|👳🏿♀️|🤵🏻♂️|🤵🏼♂️|🤵🏽♂️|🤵🏾♂️|🤵🏿♂️|🤵🏻♀️|🤵🏼♀️|🤵🏽♀️|🤵🏾♀️|🤵🏿♀️|👰🏻♂️|👰🏼♂️|👰🏽♂️|👰🏾♂️|👰🏿♂️|👰🏻♀️|👰🏼♀️|👰🏽♀️|👰🏾♀️|👰🏿♀️|👩🏻🍼|👩🏼🍼|👩🏽🍼|👩🏾🍼|👩🏿🍼|👨🏻🍼|👨🏼🍼|👨🏽🍼|👨🏾🍼|👨🏿🍼|🧑🏻🍼|🧑🏼🍼|🧑🏽🍼|🧑🏾🍼|🧑🏿🍼|🧑🏻🎄|🧑🏼🎄|🧑🏽🎄|🧑🏾🎄|🧑🏿🎄|🦸🏻♂️|🦸🏼♂️|🦸🏽♂️|🦸🏾♂️|🦸🏿♂️|🦸🏻♀️|🦸🏼♀️|🦸🏽♀️|🦸🏾♀️|🦸🏿♀️|🦹🏻♂️|🦹🏼♂️|🦹🏽♂️|🦹🏾♂️|🦹🏿♂️|🦹🏻♀️|🦹🏼♀️|🦹🏽♀️|🦹🏾♀️|🦹🏿♀️|🧙🏻♂️|🧙🏼♂️|🧙🏽♂️|🧙🏾♂️|🧙🏿♂️|🧙🏻♀️|🧙🏼♀️|🧙🏽♀️|🧙🏾♀️|🧙🏿♀️|🧚🏻♂️|🧚🏼♂️|🧚🏽♂️|🧚🏾♂️|🧚🏿♂️|🧚🏻♀️|🧚🏼♀️|🧚🏽♀️|🧚🏾♀️|🧚🏿♀️|🧛🏻♂️|🧛🏼♂️|🧛🏽♂️|🧛🏾♂️|🧛🏿♂️|🧛🏻♀️|🧛🏼♀️|🧛🏽♀️|🧛🏾♀️|🧛🏿♀️|🧜🏻♂️|🧜🏼♂️|🧜🏽♂️|🧜🏾♂️|🧜🏿♂️|🧜🏻♀️|🧜🏼♀️|🧜🏽♀️|🧜🏾♀️|🧜🏿♀️|🧝🏻♂️|🧝🏼♂️|🧝🏽♂️|🧝🏾♂️|🧝🏿♂️|🧝🏻♀️|🧝🏼♀️|🧝🏽♀️|🧝🏾♀️|🧝🏿♀️|💆🏻♂️|💆🏼♂️|💆🏽♂️|💆🏾♂️|💆🏿♂️|💆🏻♀️|💆🏼♀️|💆🏽♀️|💆🏾♀️|💆🏿♀️|💇🏻♂️|💇🏼♂️|💇🏽♂️|💇🏾♂️|💇🏿♂️|💇🏻♀️|💇🏼♀️|💇🏽♀️|💇🏾♀️|💇🏿♀️|🚶🏻♂️|🚶🏼♂️|🚶🏽♂️|🚶🏾♂️|🚶🏿♂️|🚶🏻♀️|🚶🏼♀️|🚶🏽♀️|🚶🏾♀️|🚶🏿♀️|🧍🏻♂️|🧍🏼♂️|🧍🏽♂️|🧍🏾♂️|🧍🏿♂️|🧍🏻♀️|🧍🏼♀️|🧍🏽♀️|🧍🏾♀️|🧍🏿♀️|🧎🏻♂️|🧎🏼♂️|🧎🏽♂️|🧎🏾♂️|🧎🏿♂️|🧎🏻♀️|🧎🏼♀️|🧎🏽♀️|🧎🏾♀️|🧎🏿♀️|🧑🏻🦯|🧑🏼🦯|🧑🏽🦯|🧑🏾🦯|🧑🏿🦯|👨🏻🦯|👨🏼🦯|👨🏽🦯|👨🏾🦯|👨🏿🦯|👩🏻🦯|👩🏼🦯|👩🏽🦯|👩🏾🦯|👩🏿🦯|🧑🏻🦼|🧑🏼🦼|🧑🏽🦼|🧑🏾🦼|🧑🏿🦼|👨🏻🦼|👨🏼🦼|👨🏽🦼|👨🏾🦼|👨🏿🦼|👩🏻🦼|👩🏼🦼|👩🏽🦼|👩🏾🦼|👩🏿🦼|🧑🏻🦽|🧑🏼🦽|🧑🏽🦽|🧑🏾🦽|🧑🏿🦽|👨🏻🦽|👨🏼🦽|👨🏽🦽|👨🏾🦽|👨🏿🦽|👩🏻🦽|👩🏼🦽|👩🏽🦽|👩🏾🦽|👩🏿🦽|🏃🏻♂️|🏃🏼♂️|🏃🏽♂️|🏃🏾♂️|🏃🏿♂️|🏃🏻♀️|🏃🏼♀️|🏃🏽♀️|🏃🏾♀️|🏃🏿♀️|🧖🏻♂️|🧖🏼♂️|🧖🏽♂️|🧖🏾♂️|🧖🏿♂️|🧖🏻♀️|🧖🏼♀️|🧖🏽♀️|🧖🏾♀️|🧖🏿♀️|🧗🏻♂️|🧗🏼♂️|🧗🏽♂️|🧗🏾♂️|🧗🏿♂️|🧗🏻♀️|🧗🏼♀️|🧗🏽♀️|🧗🏾♀️|🧗🏿♀️|🏌🏻♂️|🏌🏼♂️|🏌🏽♂️|🏌🏾♂️|🏌🏿♂️|🏌🏻♀️|🏌🏼♀️|🏌🏽♀️|🏌🏾♀️|🏌🏿♀️|🏄🏻♂️|🏄🏼♂️|🏄🏽♂️|🏄🏾♂️|🏄🏿♂️|🏄🏻♀️|🏄🏼♀️|🏄🏽♀️|🏄🏾♀️|🏄🏿♀️|🚣🏻♂️|🚣🏼♂️|🚣🏽♂️|🚣🏾♂️|🚣🏿♂️|🚣🏻♀️|🚣🏼♀️|🚣🏽♀️|🚣🏾♀️|🚣🏿♀️|🏊🏻♂️|🏊🏼♂️|🏊🏽♂️|🏊🏾♂️|🏊🏿♂️|🏊🏻♀️|🏊🏼♀️|🏊🏽♀️|🏊🏾♀️|🏊🏿♀️|🏋🏻♂️|🏋🏼♂️|🏋🏽♂️|🏋🏾♂️|🏋🏿♂️|🏋🏻♀️|🏋🏼♀️|🏋🏽♀️|🏋🏾♀️|🏋🏿♀️|🚴🏻♂️|🚴🏼♂️|🚴🏽♂️|🚴🏾♂️|🚴🏿♂️|🚴🏻♀️|🚴🏼♀️|🚴🏽♀️|🚴🏾♀️|🚴🏿♀️|🚵🏻♂️|🚵🏼♂️|🚵🏽♂️|🚵🏾♂️|🚵🏿♂️|🚵🏻♀️|🚵🏼♀️|🚵🏽♀️|🚵🏾♀️|🚵🏿♀️|🤸🏻♂️|🤸🏼♂️|🤸🏽♂️|🤸🏾♂️|🤸🏿♂️|🤸🏻♀️|🤸🏼♀️|🤸🏽♀️|🤸🏾♀️|🤸🏿♀️|🤽🏻♂️|🤽🏼♂️|🤽🏽♂️|🤽🏾♂️|🤽🏿♂️|🤽🏻♀️|🤽🏼♀️|🤽🏽♀️|🤽🏾♀️|🤽🏿♀️|🤾🏻♂️|🤾🏼♂️|🤾🏽♂️|🤾🏾♂️|🤾🏿♂️|🤾🏻♀️|🤾🏼♀️|🤾🏽♀️|🤾🏾♀️|🤾🏿♀️|🤹🏻♂️|🤹🏼♂️|🤹🏽♂️|🤹🏾♂️|🤹🏿♂️|🤹🏻♀️|🤹🏼♀️|🤹🏽♀️|🤹🏾♀️|🤹🏿♀️|🧘🏻♂️|🧘🏼♂️|🧘🏽♂️|🧘🏾♂️|🧘🏿♂️|🧘🏻♀️|🧘🏼♀️|🧘🏽♀️|🧘🏾♀️|🧘🏿♀️|😶🌫️|🕵️♂️|🕵️♀️|🏌️♂️|🏌️♀️|🏋️♂️|🏋️♀️|🏳️🌈|🏳️⚧️|⛹🏻♂️|⛹🏼♂️|⛹🏽♂️|⛹🏾♂️|⛹🏿♂️|⛹🏻♀️|⛹🏼♀️|⛹🏽♀️|⛹🏾♀️|⛹🏿♀️|😮💨|😵💫|❤️🔥|❤️🩹|🧔♂️|🧔♀️|👨🦰|👨🦱|👨🦳|👨🦲|👩🦰|🧑🦰|👩🦱|🧑🦱|👩🦳|🧑🦳|👩🦲|🧑🦲|👱♀️|👱♂️|🙍♂️|🙍♀️|🙎♂️|🙎♀️|🙅♂️|🙅♀️|🙆♂️|🙆♀️|💁♂️|💁♀️|🙋♂️|🙋♀️|🧏♂️|🧏♀️|🙇♂️|🙇♀️|🤦♂️|🤦♀️|🤷♂️|🤷♀️|🧑⚕️|👨⚕️|👩⚕️|🧑🎓|👨🎓|👩🎓|🧑🏫|👨🏫|👩🏫|🧑⚖️|👨⚖️|👩⚖️|🧑🌾|👨🌾|👩🌾|🧑🍳|👨🍳|👩🍳|🧑🔧|👨🔧|👩🔧|🧑🏭|👨🏭|👩🏭|🧑💼|👨💼|👩💼|🧑🔬|👨🔬|👩🔬|🧑💻|👨💻|👩💻|🧑🎤|👨🎤|👩🎤|🧑🎨|👨🎨|👩🎨|🧑✈️|👨✈️|👩✈️|🧑🚀|👨🚀|👩🚀|🧑🚒|👨🚒|👩🚒|👮♂️|👮♀️|💂♂️|💂♀️|👷♂️|👷♀️|👳♂️|👳♀️|🤵♂️|🤵♀️|👰♂️|👰♀️|👩🍼|👨🍼|🧑🍼|🧑🎄|🦸♂️|🦸♀️|🦹♂️|🦹♀️|🧙♂️|🧙♀️|🧚♂️|🧚♀️|🧛♂️|🧛♀️|🧜♂️|🧜♀️|🧝♂️|🧝♀️|🧞♂️|🧞♀️|🧟♂️|🧟♀️|💆♂️|💆♀️|💇♂️|💇♀️|🚶♂️|🚶♀️|🧍♂️|🧍♀️|🧎♂️|🧎♀️|🧑🦯|👨🦯|👩🦯|🧑🦼|👨🦼|👩🦼|🧑🦽|👨🦽|👩🦽|🏃♂️|🏃♀️|👯♂️|👯♀️|🧖♂️|🧖♀️|🧗♂️|🧗♀️|🏄♂️|🏄♀️|🚣♂️|🚣♀️|🏊♂️|🏊♀️|⛹️♂️|⛹️♀️|🚴♂️|🚴♀️|🚵♂️|🚵♀️|🤸♂️|🤸♀️|🤼♂️|🤼♀️|🤽♂️|🤽♀️|🤾♂️|🤾♀️|🤹♂️|🤹♀️|🧘♂️|🧘♀️|👨👦|👨👧|👩👦|👩👧|🐕🦺|🐻❄️|🏴☠️|🐈⬛|🇦🇨|🇦🇩|🇦🇪|🇦🇫|🇦🇬|🇦🇮|🇦🇱|🇦🇲|🇦🇴|🇦🇶|🇦🇷|🇦🇸|🇦🇹|🇦🇺|🇦🇼|🇦🇽|🇦🇿|🇧🇦|🇧🇧|🇧🇩|🇧🇪|🇧🇫|🇧🇬|🇧🇭|🇧🇮|🇧🇯|🇧🇱|🇧🇲|🇧🇳|🇧🇴|🇧🇶|🇧🇷|🇧🇸|🇧🇹|🇧🇻|🇧🇼|🇧🇾|🇧🇿|🇨🇦|🇨🇨|🇨🇩|🇨🇫|🇨🇬|🇨🇭|🇨🇮|🇨🇰|🇨🇱|🇨🇲|🇨🇳|🇨🇴|🇨🇵|🇨🇷|🇨🇺|🇨🇻|🇨🇼|🇨🇽|🇨🇾|🇨🇿|🇩🇪|🇩🇬|🇩🇯|🇩🇰|🇩🇲|🇩🇴|🇩🇿|🇪🇦|🇪🇨|🇪🇪|🇪🇬|🇪🇭|🇪🇷|🇪🇸|🇪🇹|🇪🇺|🇫🇮|🇫🇯|🇫🇰|🇫🇲|🇫🇴|🇫🇷|🇬🇦|🇬🇧|🇬🇩|🇬🇪|🇬🇫|🇬🇬|🇬🇭|🇬🇮|🇬🇱|🇬🇲|🇬🇳|🇬🇵|🇬🇶|🇬🇷|🇬🇸|🇬🇹|🇬🇺|🇬🇼|🇬🇾|🇭🇰|🇭🇲|🇭🇳|🇭🇷|🇭🇹|🇭🇺|🇮🇨|🇮🇩|🇮🇪|🇮🇱|🇮🇲|🇮🇳|🇮🇴|🇮🇶|🇮🇷|🇮🇸|🇮🇹|🇯🇪|🇯🇲|🇯🇴|🇯🇵|🇰🇪|🇰🇬|🇰🇭|🇰🇮|🇰🇲|🇰🇳|🇰🇵|🇰🇷|🇰🇼|🇰🇾|🇰🇿|🇱🇦|🇱🇧|🇱🇨|🇱🇮|🇱🇰|🇱🇷|🇱🇸|🇱🇹|🇱🇺|🇱🇻|🇱🇾|🇲🇦|🇲🇨|🇲🇩|🇲🇪|🇲🇫|🇲🇬|🇲🇭|🇲🇰|🇲🇱|🇲🇲|🇲🇳|🇲🇴|🇲🇵|🇲🇶|🇲🇷|🇲🇸|🇲🇹|🇲🇺|🇲🇻|🇲🇼|🇲🇽|🇲🇾|🇲🇿|🇳🇦|🇳🇨|🇳🇪|🇳🇫|🇳🇬|🇳🇮|🇳🇱|🇳🇴|🇳🇵|🇳🇷|🇳🇺|🇳🇿|🇴🇲|🇵🇦|🇵🇪|🇵🇫|🇵🇬|🇵🇭|🇵🇰|🇵🇱|🇵🇲|🇵🇳|🇵🇷|🇵🇸|🇵🇹|🇵🇼|🇵🇾|🇶🇦|🇷🇪|🇷🇴|🇷🇸|🇷🇺|🇷🇼|🇸🇦|🇸🇧|🇸🇨|🇸🇩|🇸🇪|🇸🇬|🇸🇭|🇸🇮|🇸🇯|🇸🇰|🇸🇱|🇸🇲|🇸🇳|🇸🇴|🇸🇷|🇸🇸|🇸🇹|🇸🇻|🇸🇽|🇸🇾|🇸🇿|🇹🇦|🇹🇨|🇹🇩|🇹🇫|🇹🇬|🇹🇭|🇹🇯|🇹🇰|🇹🇱|🇹🇲|🇹🇳|🇹🇴|🇹🇷|🇹🇹|🇹🇻|🇹🇼|🇹🇿|🇺🇦|🇺🇬|🇺🇲|🇺🇳|🇺🇸|🇺🇾|🇺🇿|🇻🇦|🇻🇨|🇻🇪|🇻🇬|🇻🇮|🇻🇳|🇻🇺|🇼🇫|🇼🇸|🇽🇰|🇾🇪|🇾🇹|🇿🇦|🇿🇲|🇿🇼|👋🏻|👋🏼|👋🏽|👋🏾|👋🏿|🤚🏻|🤚🏼|🤚🏽|🤚🏾|🤚🏿|🖐🏻|🖐🏼|🖐🏽|🖐🏾|🖐🏿|🖖🏻|🖖🏼|🖖🏽|🖖🏾|🖖🏿|👌🏻|👌🏼|👌🏽|👌🏾|👌🏿|🤌🏻|🤌🏼|🤌🏽|🤌🏾|🤌🏿|🤏🏻|🤏🏼|🤏🏽|🤏🏾|🤏🏿|🤞🏻|🤞🏼|🤞🏽|🤞🏾|🤞🏿|🤟🏻|🤟🏼|🤟🏽|🤟🏾|🤟🏿|🤘🏻|🤘🏼|🤘🏽|🤘🏾|🤘🏿|🤙🏻|🤙🏼|🤙🏽|🤙🏾|🤙🏿|👈🏻|👈🏼|👈🏽|👈🏾|👈🏿|👉🏻|👉🏼|👉🏽|👉🏾|👉🏿|👆🏻|👆🏼|👆🏽|👆🏾|👆🏿|🖕🏻|🖕🏼|🖕🏽|🖕🏾|🖕🏿|👇🏻|👇🏼|👇🏽|👇🏾|👇🏿|👍🏻|👍🏼|👍🏽|👍🏾|👍🏿|👎🏻|👎🏼|👎🏽|👎🏾|👎🏿|👊🏻|👊🏼|👊🏽|👊🏾|👊🏿|🤛🏻|🤛🏼|🤛🏽|🤛🏾|🤛🏿|🤜🏻|🤜🏼|🤜🏽|🤜🏾|🤜🏿|👏🏻|👏🏼|👏🏽|👏🏾|👏🏿|🙌🏻|🙌🏼|🙌🏽|🙌🏾|🙌🏿|👐🏻|👐🏼|👐🏽|👐🏾|👐🏿|🤲🏻|🤲🏼|🤲🏽|🤲🏾|🤲🏿|🙏🏻|🙏🏼|🙏🏽|🙏🏾|🙏🏿|💅🏻|💅🏼|💅🏽|💅🏾|💅🏿|🤳🏻|🤳🏼|🤳🏽|🤳🏾|🤳🏿|💪🏻|💪🏼|💪🏽|💪🏾|💪🏿|🦵🏻|🦵🏼|🦵🏽|🦵🏾|🦵🏿|🦶🏻|🦶🏼|🦶🏽|🦶🏾|🦶🏿|👂🏻|👂🏼|👂🏽|👂🏾|👂🏿|🦻🏻|🦻🏼|🦻🏽|🦻🏾|🦻🏿|👃🏻|👃🏼|👃🏽|👃🏾|👃🏿|👶🏻|👶🏼|👶🏽|👶🏾|👶🏿|🧒🏻|🧒🏼|🧒🏽|🧒🏾|🧒🏿|👦🏻|👦🏼|👦🏽|👦🏾|👦🏿|👧🏻|👧🏼|👧🏽|👧🏾|👧🏿|🧑🏻|🧑🏼|🧑🏽|🧑🏾|🧑🏿|👱🏻|👱🏼|👱🏽|👱🏾|👱🏿|👨🏻|👨🏼|👨🏽|👨🏾|👨🏿|🧔🏻|🧔🏼|🧔🏽|🧔🏾|🧔🏿|👩🏻|👩🏼|👩🏽|👩🏾|👩🏿|🧓🏻|🧓🏼|🧓🏽|🧓🏾|🧓🏿|👴🏻|👴🏼|👴🏽|👴🏾|👴🏿|👵🏻|👵🏼|👵🏽|👵🏾|👵🏿|🙍🏻|🙍🏼|🙍🏽|🙍🏾|🙍🏿|🙎🏻|🙎🏼|🙎🏽|🙎🏾|🙎🏿|🙅🏻|🙅🏼|🙅🏽|🙅🏾|🙅🏿|🙆🏻|🙆🏼|🙆🏽|🙆🏾|🙆🏿|💁🏻|💁🏼|💁🏽|💁🏾|💁🏿|🙋🏻|🙋🏼|🙋🏽|🙋🏾|🙋🏿|🧏🏻|🧏🏼|🧏🏽|🧏🏾|🧏🏿|🙇🏻|🙇🏼|🙇🏽|🙇🏾|🙇🏿|🤦🏻|🤦🏼|🤦🏽|🤦🏾|🤦🏿|🤷🏻|🤷🏼|🤷🏽|🤷🏾|🤷🏿|👮🏻|👮🏼|👮🏽|👮🏾|👮🏿|🕵🏻|🕵🏼|🕵🏽|🕵🏾|🕵🏿|💂🏻|💂🏼|💂🏽|💂🏾|💂🏿|🥷🏻|🥷🏼|🥷🏽|🥷🏾|🥷🏿|👷🏻|👷🏼|👷🏽|👷🏾|👷🏿|🤴🏻|🤴🏼|🤴🏽|🤴🏾|🤴🏿|👸🏻|👸🏼|👸🏽|👸🏾|👸🏿|👳🏻|👳🏼|👳🏽|👳🏾|👳🏿|👲🏻|👲🏼|👲🏽|👲🏾|👲🏿|🧕🏻|🧕🏼|🧕🏽|🧕🏾|🧕🏿|🤵🏻|🤵🏼|🤵🏽|🤵🏾|🤵🏿|👰🏻|👰🏼|👰🏽|👰🏾|👰🏿|🤰🏻|🤰🏼|🤰🏽|🤰🏾|🤰🏿|🤱🏻|🤱🏼|🤱🏽|🤱🏾|🤱🏿|👼🏻|👼🏼|👼🏽|👼🏾|👼🏿|🎅🏻|🎅🏼|🎅🏽|🎅🏾|🎅🏿|🤶🏻|🤶🏼|🤶🏽|🤶🏾|🤶🏿|🦸🏻|🦸🏼|🦸🏽|🦸🏾|🦸🏿|🦹🏻|🦹🏼|🦹🏽|🦹🏾|🦹🏿|🧙🏻|🧙🏼|🧙🏽|🧙🏾|🧙🏿|🧚🏻|🧚🏼|🧚🏽|🧚🏾|🧚🏿|🧛🏻|🧛🏼|🧛🏽|🧛🏾|🧛🏿|🧜🏻|🧜🏼|🧜🏽|🧜🏾|🧜🏿|🧝🏻|🧝🏼|🧝🏽|🧝🏾|🧝🏿|💆🏻|💆🏼|💆🏽|💆🏾|💆🏿|💇🏻|💇🏼|💇🏽|💇🏾|💇🏿|🚶🏻|🚶🏼|🚶🏽|🚶🏾|🚶🏿|🧍🏻|🧍🏼|🧍🏽|🧍🏾|🧍🏿|🧎🏻|🧎🏼|🧎🏽|🧎🏾|🧎🏿|🏃🏻|🏃🏼|🏃🏽|🏃🏾|🏃🏿|💃🏻|💃🏼|💃🏽|💃🏾|💃🏿|🕺🏻|🕺🏼|🕺🏽|🕺🏾|🕺🏿|🕴🏻|🕴🏼|🕴🏽|🕴🏾|🕴🏿|🧖🏻|🧖🏼|🧖🏽|🧖🏾|🧖🏿|🧗🏻|🧗🏼|🧗🏽|🧗🏾|🧗🏿|🏇🏻|🏇🏼|🏇🏽|🏇🏾|🏇🏿|🏂🏻|🏂🏼|🏂🏽|🏂🏾|🏂🏿|🏌🏻|🏌🏼|🏌🏽|🏌🏾|🏌🏿|🏄🏻|🏄🏼|🏄🏽|🏄🏾|🏄🏿|🚣🏻|🚣🏼|🚣🏽|🚣🏾|🚣🏿|🏊🏻|🏊🏼|🏊🏽|🏊🏾|🏊🏿|🏋🏻|🏋🏼|🏋🏽|🏋🏾|🏋🏿|🚴🏻|🚴🏼|🚴🏽|🚴🏾|🚴🏿|🚵🏻|🚵🏼|🚵🏽|🚵🏾|🚵🏿|🤸🏻|🤸🏼|🤸🏽|🤸🏾|🤸🏿|🤽🏻|🤽🏼|🤽🏽|🤽🏾|🤽🏿|🤾🏻|🤾🏼|🤾🏽|🤾🏾|🤾🏿|🤹🏻|🤹🏼|🤹🏽|🤹🏾|🤹🏿|🧘🏻|🧘🏼|🧘🏽|🧘🏾|🧘🏿|🛀🏻|🛀🏼|🛀🏽|🛀🏾|🛀🏿|🛌🏻|🛌🏼|🛌🏽|🛌🏾|🛌🏿|👭🏻|👭🏼|👭🏽|👭🏾|👭🏿|👫🏻|👫🏼|👫🏽|👫🏾|👫🏿|👬🏻|👬🏼|👬🏽|👬🏾|👬🏿|💏🏻|💏🏼|💏🏽|💏🏾|💏🏿|💑🏻|💑🏼|💑🏽|💑🏾|💑🏿|#️⃣|0️⃣|1️⃣|2️⃣|3️⃣|4️⃣|5️⃣|6️⃣|7️⃣|8️⃣|9️⃣|✋🏻|✋🏼|✋🏽|✋🏾|✋🏿|✌🏻|✌🏼|✌🏽|✌🏾|✌🏿|☝🏻|☝🏼|☝🏽|☝🏾|☝🏿|✊🏻|✊🏼|✊🏽|✊🏾|✊🏿|✍🏻|✍🏼|✍🏽|✍🏾|✍🏿|⛹🏻|⛹🏼|⛹🏽|⛹🏾|⛹🏿|😀|😃|😄|😁|😆|😅|🤣|😂|🙂|🙃|😉|😊|😇|🥰|😍|🤩|😘|😗|😚|😙|🥲|😋|😛|😜|🤪|😝|🤑|🤗|🤭|🤫|🤔|🤐|🤨|😐|😑|😶|😏|😒|🙄|😬|🤥|😌|😔|😪|🤤|😴|😷|🤒|🤕|🤢|🤮|🤧|🥵|🥶|🥴|😵|🤯|🤠|🥳|🥸|😎|🤓|🧐|😕|😟|🙁|😮|😯|😲|😳|🥺|😦|😧|😨|😰|😥|😢|😭|😱|😖|😣|😞|😓|😩|😫|🥱|😤|😡|😠|🤬|😈|👿|💀|💩|🤡|👹|👺|👻|👽|👾|🤖|😺|😸|😹|😻|😼|😽|🙀|😿|😾|🙈|🙉|🙊|💋|💌|💘|💝|💖|💗|💓|💞|💕|💟|💔|🧡|💛|💚|💙|💜|🤎|🖤|🤍|💯|💢|💥|💫|💦|💨|🕳|💣|💬|🗨|🗯|💭|💤|👋|🤚|🖐|🖖|👌|🤌|🤏|🤞|🤟|🤘|🤙|👈|👉|👆|🖕|👇|👍|👎|👊|🤛|🤜|👏|🙌|👐|🤲|🤝|🙏|💅|🤳|💪|🦾|🦿|🦵|🦶|👂|🦻|👃|🧠|🫀|🫁|🦷|🦴|👀|👁|👅|👄|👶|🧒|👦|👧|🧑|👱|👨|🧔|👩|🧓|👴|👵|🙍|🙎|🙅|🙆|💁|🙋|🧏|🙇|🤦|🤷|👮|🕵|💂|🥷|👷|🤴|👸|👳|👲|🧕|🤵|👰|🤰|🤱|👼|🎅|🤶|🦸|🦹|🧙|🧚|🧛|🧜|🧝|🧞|🧟|💆|💇|🚶|🧍|🧎|🏃|💃|🕺|🕴|👯|🧖|🧗|🤺|🏇|🏂|🏌|🏄|🚣|🏊|🏋|🚴|🚵|🤸|🤼|🤽|🤾|🤹|🧘|🛀|🛌|👭|👫|👬|💏|💑|👪|🗣|👤|👥|🫂|👣|🦰|🦱|🦳|🦲|🐵|🐒|🦍|🦧|🐶|🐕|🦮|🐩|🐺|🦊|🦝|🐱|🐈|🦁|🐯|🐅|🐆|🐴|🐎|🦄|🦓|🦌|🦬|🐮|🐂|🐃|🐄|🐷|🐖|🐗|🐽|🐏|🐑|🐐|🐪|🐫|🦙|🦒|🐘|🦣|🦏|🦛|🐭|🐁|🐀|🐹|🐰|🐇|🐿|🦫|🦔|🦇|🐻|🐨|🐼|🦥|🦦|🦨|🦘|🦡|🐾|🦃|🐔|🐓|🐣|🐤|🐥|🐦|🐧|🕊|🦅|🦆|🦢|🦉|🦤|🪶|🦩|🦚|🦜|🐸|🐊|🐢|🦎|🐍|🐲|🐉|🦕|🦖|🐳|🐋|🐬|🦭|🐟|🐠|🐡|🦈|🐙|🐚|🐌|🦋|🐛|🐜|🐝|🪲|🐞|🦗|🪳|🕷|🕸|🦂|🦟|🪰|🪱|🦠|💐|🌸|💮|🏵|🌹|🥀|🌺|🌻|🌼|🌷|🌱|🪴|🌲|🌳|🌴|🌵|🌾|🌿|🍀|🍁|🍂|🍃|🍇|🍈|🍉|🍊|🍋|🍌|🍍|🥭|🍎|🍏|🍐|🍑|🍒|🍓|🫐|🥝|🍅|🫒|🥥|🥑|🍆|🥔|🥕|🌽|🌶|🫑|🥒|🥬|🥦|🧄|🧅|🍄|🥜|🌰|🍞|🥐|🥖|🫓|🥨|🥯|🥞|🧇|🧀|🍖|🍗|🥩|🥓|🍔|🍟|🍕|🌭|🥪|🌮|🌯|🫔|🥙|🧆|🥚|🍳|🥘|🍲|🫕|🥣|🥗|🍿|🧈|🧂|🥫|🍱|🍘|🍙|🍚|🍛|🍜|🍝|🍠|🍢|🍣|🍤|🍥|🥮|🍡|🥟|🥠|🥡|🦀|🦞|🦐|🦑|🦪|🍦|🍧|🍨|🍩|🍪|🎂|🍰|🧁|🥧|🍫|🍬|🍭|🍮|🍯|🍼|🥛|🫖|🍵|🍶|🍾|🍷|🍸|🍹|🍺|🍻|🥂|🥃|🥤|🧋|🧃|🧉|🧊|🥢|🍽|🍴|🥄|🔪|🏺|🌍|🌎|🌏|🌐|🗺|🗾|🧭|🏔|🌋|🗻|🏕|🏖|🏜|🏝|🏞|🏟|🏛|🏗|🧱|🪨|🪵|🛖|🏘|🏚|🏠|🏡|🏢|🏣|🏤|🏥|🏦|🏨|🏩|🏪|🏫|🏬|🏭|🏯|🏰|💒|🗼|🗽|🕌|🛕|🕍|🕋|🌁|🌃|🏙|🌄|🌅|🌆|🌇|🌉|🎠|🎡|🎢|💈|🎪|🚂|🚃|🚄|🚅|🚆|🚇|🚈|🚉|🚊|🚝|🚞|🚋|🚌|🚍|🚎|🚐|🚑|🚒|🚓|🚔|🚕|🚖|🚗|🚘|🚙|🛻|🚚|🚛|🚜|🏎|🏍|🛵|🦽|🦼|🛺|🚲|🛴|🛹|🛼|🚏|🛣|🛤|🛢|🚨|🚥|🚦|🛑|🚧|🛶|🚤|🛳|🛥|🚢|🛩|🛫|🛬|🪂|💺|🚁|🚟|🚠|🚡|🛰|🚀|🛸|🛎|🧳|🕰|🕛|🕧|🕐|🕜|🕑|🕝|🕒|🕞|🕓|🕟|🕔|🕠|🕕|🕡|🕖|🕢|🕗|🕣|🕘|🕤|🕙|🕥|🕚|🕦|🌑|🌒|🌓|🌔|🌕|🌖|🌗|🌘|🌙|🌚|🌛|🌜|🌡|🌝|🌞|🪐|🌟|🌠|🌌|🌤|🌥|🌦|🌧|🌨|🌩|🌪|🌫|🌬|🌀|🌈|🌂|🔥|💧|🌊|🎃|🎄|🎆|🎇|🧨|🎈|🎉|🎊|🎋|🎍|🎎|🎏|🎐|🎑|🧧|🎀|🎁|🎗|🎟|🎫|🎖|🏆|🏅|🥇|🥈|🥉|🥎|🏀|🏐|🏈|🏉|🎾|🥏|🎳|🏏|🏑|🏒|🥍|🏓|🏸|🥊|🥋|🥅|🎣|🤿|🎽|🎿|🛷|🥌|🎯|🪀|🪁|🎱|🔮|🪄|🧿|🎮|🕹|🎰|🎲|🧩|🧸|🪅|🪆|🃏|🀄|🎴|🎭|🖼|🎨|🧵|🪡|🧶|🪢|👓|🕶|🥽|🥼|🦺|👔|👕|👖|🧣|🧤|🧥|🧦|👗|👘|🥻|🩱|🩲|🩳|👙|👚|👛|👜|👝|🛍|🎒|🩴|👞|👟|🥾|🥿|👠|👡|🩰|👢|👑|👒|🎩|🎓|🧢|🪖|📿|💄|💍|💎|🔇|🔈|🔉|🔊|📢|📣|📯|🔔|🔕|🎼|🎵|🎶|🎙|🎚|🎛|🎤|🎧|📻|🎷|🪗|🎸|🎹|🎺|🎻|🪕|🥁|🪘|📱|📲|📞|📟|📠|🔋|🔌|💻|🖥|🖨|🖱|🖲|💽|💾|💿|📀|🧮|🎥|🎞|📽|🎬|📺|📷|📸|📹|📼|🔍|🔎|🕯|💡|🔦|🏮|🪔|📔|📕|📖|📗|📘|📙|📚|📓|📒|📃|📜|📄|📰|🗞|📑|🔖|🏷|💰|🪙|💴|💵|💶|💷|💸|💳|🧾|💹|📧|📨|📩|📤|📥|📦|📫|📪|📬|📭|📮|🗳|🖋|🖊|🖌|🖍|📝|💼|📁|📂|🗂|📅|📆|🗒|🗓|📇|📈|📉|📊|📋|📌|📍|📎|🖇|📏|📐|🗃|🗄|🗑|🔒|🔓|🔏|🔐|🔑|🗝|🔨|🪓|🛠|🗡|🔫|🪃|🏹|🛡|🪚|🔧|🪛|🔩|🗜|🦯|🔗|🪝|🧰|🧲|🪜|🧪|🧫|🧬|🔬|🔭|📡|💉|🩸|💊|🩹|🩺|🚪|🛗|🪞|🪟|🛏|🛋|🪑|🚽|🪠|🚿|🛁|🪤|🪒|🧴|🧷|🧹|🧺|🧻|🪣|🧼|🪥|🧽|🧯|🛒|🚬|🪦|🗿|🪧|🏧|🚮|🚰|🚹|🚺|🚻|🚼|🚾|🛂|🛃|🛄|🛅|🚸|🚫|🚳|🚭|🚯|🚱|🚷|📵|🔞|🔃|🔄|🔙|🔚|🔛|🔜|🔝|🛐|🕉|🕎|🔯|🔀|🔁|🔂|🔼|🔽|🎦|🔅|🔆|📶|📳|📴|💱|💲|🔱|📛|🔰|🔟|🔠|🔡|🔢|🔣|🔤|🅰|🆎|🅱|🆑|🆒|🆓|🆔|🆕|🆖|🅾|🆗|🅿|🆘|🆙|🆚|🈁|🈂|🈷|🈶|🈯|🉐|🈹|🈚|🈲|🉑|🈸|🈴|🈳|🈺|🈵|🔴|🟠|🟡|🟢|🔵|🟣|🟤|🟥|🟧|🟨|🟩|🟦|🟪|🟫|🔶|🔷|🔸|🔹|🔺|🔻|💠|🔘|🔳|🔲|🏁|🚩|🎌|🏴|🏳|🏻|🏼|🏽|🏾|🏿|☺|☹|☠|❣|❤|✋|✌|☝|✊|✍|⛷|⛹|☘|☕|⛰|⛪|⛩|⛲|⛺|♨|⛽|⚓|⛵|⛴|✈|⌛|⏳|⌚|⏰|⏱|⏲|☀|⭐|☁|⛅|⛈|☂|☔|⛱|⚡|❄|☃|⛄|☄|✨|⚽|⚾|⛳|⛸|♠|♥|♦|♣|♟|⛑|☎|⌨|✉|✏|✒|✂|⛏|⚒|⚔|⚙|⚖|⛓|⚗|⚰|⚱|♿|⚠|⛔|☢|☣|⬆|↗|➡|↘|⬇|↙|⬅|↖|↕|↔|↩|↪|⤴|⤵|⚛|✡|☸|☯|✝|☦|☪|☮|♈|♉|♊|♋|♌|♍|♎|♏|♐|♑|♒|♓|⛎|▶|⏩|⏭|⏯|◀|⏪|⏮|⏫|⏬|⏸|⏹|⏺|⏏|♀|♂|⚧|✖|➕|➖|➗|♾|‼|⁉|❓|❔|❕|❗|〰|⚕|♻|⚜|⭕|✅|☑|✔|❌|❎|➰|➿|〽|✳|✴|❇|©|®|™|ℹ|Ⓜ|㊗|㊙|⚫|⚪|⬛|⬜|◼|◻|◾|◽|▪|▫)`
/*compile the pattern string into a regex*/
let emoRegex = new RegExp(emojiPattern, "g");
/*count of emojis*/
let emoCount = [..."👶🏻👦🏻👧🏻👨🏻👩🏻👱🏻♀️👱🏻👴🏻👵🏻👲🏻👳🏻♀️👳🏻👮🏻♀️👮🏻👷🏻♀️👷🏻💂🏻♀️💂🏻🕵🏻♀️👩🏻⚕️👨🏻⚕️👩🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾".matchAll(emoRegex)].length
console.log(emoCount) //37
/*modifying the pattern to count other characters too*/
let generalCounter = new RegExp(emojiPattern+"|.", "g") //emoji or regular character
let allCount = [..."$%^ other stuff equalling 28👶👦🏻👧🏻👨🏻👩🏻👱🏻♀️👱🏻👴🏻👵🏻👲🏻👳🏻♀️👳🏻👮🏻♀️👮🏻👷🏻♀️👷🏻💂🏻♀️💂🏻🕵🏻♀️👩🏻⚕️👨🏻⚕️👩🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾👨🏻🌾".matchAll(generalCounter)].length
console.log(allCount) //28+37 = 65
As you can see from the below example, this is to do with unicode encoding,
There's some great resources such as the one I took this example from.
https://blog.jonnew.com/posts/poo-dot-length-equals-two
console.log("👩❤️💋👩".length === 11);
For anyone interested, I had a similar problem where I wanted to count the length of an emoji at the end of a string.
This is the solution I came up with:
var emoji = new RegExp('(\\p{Extended_Pictographic})((\u200D\\p{Extended_Pictographic})*)$', 'u');
var testStrings = ['👨👩👧', '😂', '🌲'];
for(var string = 0; string < testStrings.length; string++){
var match = testStrings[string].match(emoji);
var chars = match == null ? 0 : match[0].length;
console.log(testStrings[string] + ': ' + chars);
}
Explanation: \\p{Extended_Pictographic} matches an emoji like 😂, consisting of two characters. Emojis like 👨👩👧 consists of 4 emojis (👨, 👩, 👧,👦) combined by a zero width joiner (\u200D).
The regex matches any emoji at the end ($). If there is a match the length is counted. I am sure it could be adopted for your use-case by matching all emojis in a given string and then subtracting the surplus. It's not a complete implementation for your particular question but I hope this gets you on the right track.
use lodash toArray method
console.log(_.toArray("👨👩👧").length); // 1
console.log(_.toArray("👨👩👧🧍♂️👩👧👧").length); // 3
Check here for Codesandbox
I suggest using the runes package to accomplish correct multi-byte string conversions cause else you will get more issues if using reducers and more to reverse strings for example.
Take a look at this great small package: runes
I'm writing a bot for Discord, and I want to be able to detect if a string contains a substring that is in the format :smilie:, for example
"I am so excited for this video game! :getin:".
Currently the way I have it set up, if a user posts a separate message, ie.
I am so excited for this video game!
:getin:
my bot will attach the smilie by using this algorithm
case startsWith(message, ":"):
channel.uploadFile("saemotes/"+message+".png");
channel.uploadFile("saemotes/"+message+".gif");
break;
This works fine, however I would like it to be more elegant. All image files for the emotes are named :smilie_name:.png/.gif depending on what it is, so based on that, what would be the best regex expression to pull the potential file name out of a string? I'm assuming it would be something like
case S(message).match(/\b:smilie_name:\b/) !== null:
smilie_name_parsed_from_regex = <regex_result>;
channel.uploadFile("saemotes/"+<smilie_name_parsed_from_regex>+".png");
channel.uploadFile("saemotes/"+<smilie_name_parsed_from_regex>+".gif");
break;
Any help would be appreciated, thanks!
Seems like a minor alteration to your regex should do the trick:
case /:([\w]+):/g.test(S(message)) === true:
var images = S(message).match(/:([\w]+):/g);
// map matches into urls and upload
images.map(function(image) {
return 'saemotes/'+image.replace(/:/g, '')+'.png';
}).forEach(channel.uploadFile);
break;
The pattern to use is:
:[A-Za-z]++:
This pattern matches any pair of colons with at least one (therefore the +) alphabetical characters inside. The second plus is used to make the + possesive, that means it is taking as many characters as popossib and won't backtrack in case of a fail. This is not certainly necessary, but improves performance slightly.
Readability aside, are there any discernable differences (performance perhaps) between using
str.indexOf("src")
and
str.match(/src/)
I personally prefer match (and regexp) but colleagues seem to go the other way. We were wondering if it mattered ...?
EDIT:
I should have said at the outset that this is for functions that will be doing partial plain-string matching (to pick up identifiers in class attributes for JQuery) rather than full regexp searches with wildcards etc.
class='redBorder DisablesGuiClass-2345-2d73-83hf-8293'
So it's the difference between:
string.indexOf('DisablesGuiClass-');
and
string.match(/DisablesGuiClass-/)
RegExp is indeed slower than indexOf (you can see it here), though normally this shouldn't be an issue. With RegExp, you also have to make sure the string is properly escaped, which is an extra thing to think about.
Both of those issues aside, if two tools do exactly what you need them to, why not choose the simpler one?
Your comparison may not be entirely fair. indexOf is used with plain strings and is therefore very fast; match takes a regular expression - of course it may be slower in comparison, but if you want to do a regex match, you won't get far with indexOf. On the other hand, regular expression engines can be optimized, and have been improving in performance in the last years.
In your case, where you're looking for a verbatim string, indexOf should be sufficient. There is still one application for regexes, though: If you need to match entire words and want to avoid matching substrings, then regular expressions give you "word boundary anchors". For example:
indexOf('bar')
will find bar three times in bar, fubar, barmy, whereas
match(/\bbar\b/)
will only match bar when it is not part of a longer word.
As you can see in the comments, some comparisons have been done that show that a regex may be faster than indexOf - if it's performance-critical, you may need to profile your code.
Here all possible ways (relatively) to search for string
// 1. includes (introduced in ES6)
var string = "string to search for substring",
substring = "sea";
string.includes(substring);
// 2. string.indexOf
var string = "string to search for substring",
substring = "sea";
string.indexOf(substring) !== -1;
// 3. RegExp: test
var string = "string to search for substring",
expr = /sea/; // no quotes here
expr.test(string);
// 4. string.match
var string = "string to search for substring",
expr = "/sea/";
string.match(expr);
//5. string.search
var string = "string to search for substring",
expr = "/sea/";
string.search(expr);
Here a src: https://koukia.ca/top-6-ways-to-search-for-a-string-in-javascript-and-performance-benchmarks-ce3e9b81ad31
Benchmarks seem to be twisted specially for es6 includes , read the comments.
In resume:
if you don't need the matches.
=> Either you need regex and so use test. Otherwise es6 includes or indexOf. Still test vs indexOf are close.
And for includes vs indexOf:
They seem to be the same : https://jsperf.com/array-indexof-vs-includes/4 (if it was different it would be wierd, they mostly perform the same except for the differences that they expose check this)
And for my own benchmark test. here it is http://jsben.ch/fFnA0
You can test it (it's browser dependent) [test multiple time]
here how it performed (multiple run indexOf and includes one beat the other, and they are close). So they are the same. [here using the same test platform as the article above].
And here for the a long text version (8 times longer)
http://jsben.ch/wSBA2
Tested both chrome and firefox, same thing.
Notice jsben.ch doesn't handle memory overflow (or there limits correctly. It doesn't show any message) so result can get wrong if you add more then 8 text duplication (8 work well). But the conclusion is for very big text all three perform the same way. Otherwise for short indexOf and includes are the same and test a little bit slower. or Can be the same as it seemed in chrome (firefox 60 it is slower).
Notice with jsben.ch: don't freak out if you get inconsistant result. Try different time and see if it's consistent or not. Change browser, sometimes they just run totally wrong. Bug or bad handling of memory. Or something.
ex:
Here too my benchmark on jsperf (better details, and handle graphs for multiple browsers)
(top is chrome)
normal text
https://jsperf.com/indexof-vs-includes-vs-test-2019
resume: includes and indexOf have same perofrmance. test slower.
(seem all three perform the same in chrom)
Long text (12 time longer then normal)
https://jsperf.com/indexof-vs-includes-vs-test-2019-long-text-str/
resume: All the three perform the same. (chrome and firefox)
very short string
https://jsperf.com/indexof-vs-includes-vs-test-2019-too-short-string/
resume: includes and indexOf perform the same and test slower.
Note: about the benchmark above. For the very short string version (jsperf) had an big error for chrome. Seeing by my eyes. around 60 sample was run for both indexOf and includes same way (repeated a lot of time). And test a little bit less and so slower.
don't be fooled with the wrong graph. It's clear wrong. Same test work ok for firefox, surely it's a bug.
Here the illustration: (the first image was the test on firefox)
waaaa. Suddenly indexOf became superman. But as i said i did the test, and looked at the number of samples it was around 60. Both indexOf and includes and they performed the same. A bug on jspref. Except for this one (maybe because of a memory restriction related problem) all the rest was consistent, it give more details. And you see how many simple happen in real time.
Final resume
indexOf vs includes => Same performance
test => can be slower for short strings or text. And the same for long texts. And it make sense for the overhead that the regex engine add. In chrome it seemed it doesn't matter at all.
If you're trying to search for substring occurrences case-insensitively then match seems to be faster than a combination of indexOf and toLowerCase()
Check here - http://jsperf.com/regexp-vs-indexof/152
You ask whether str.indexOf('target') or str.match(/target/) should be preferred. As other posters have suggested, the use cases and return types of these methods are different. The first asks "where in str can I first find 'target'?" The second asks "does str match the regex and, if so, what are all of the matches for any associated capture groups?"
The issue is that neither one technically is designed to ask the simpler question "does the string contain the substring?" There is something that is explicitly designed to do so:
var doesStringContainTarget = /target/.test(str);
There are several advantages to using regex.test(string):
It returns a boolean, which is what you care about
It is more performant than str.match(/target/) (and rivals str.indexOf('target'))
If for some reason, str is undefined or null, you'll get false (the desired result) instead of throwing a TypeError
Using indexOf should, in theory, be faster than a regex when you're just searching for some plain text, but you should do some comparative benchmarks yourself if you're concerned about performance.
If you prefer match and it's fast enough for your needs then go for it.
For what it's worth, I agree with your colleagues on this: I'd use indexOf when searching for a plain string, and use match etc only when I need the extra functionality provided by regular expressions.
Performance wise indexOf will at the very least be slightly faster than match. It all comes down to the specific implementation. When deciding which to use ask yourself the following question:
Will an integer index suffice or do I
need the functionality of a RegExp
match result?
The return values are different
Aside from the performance implications, which are addressed by other answers, it is important to note that the return values for each method are different; so the methods cannot merely be substituted without also changing your logic.
Return value of .indexOf: integer
The index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex.Returns -1 if the value is not found.
Return value of .match: array
An Array containing the entire match result and any parentheses-captured matched results.Returns null if there were no matches.
Because .indexOf returns 0 if the calling string begins with the specified value, a simple truthy test will fail.
For example:
Given this class…
class='DisablesGuiClass-2345-2d73-83hf-8293 redBorder'
…the return values for each would differ:
// returns `0`, evaluates to `false`
if (string.indexOf('DisablesGuiClass-')) {
… // this block is skipped.
}
vs.
// returns `["DisablesGuiClass-"]`, evaluates to `true`
if (string.match(/DisablesGuiClass-/)) {
… // this block is run.
}
The correct way to run a truthy test with the return from .indexOf is to test against -1:
if (string.indexOf('DisablesGuiClass-') !== -1) {
// ^returns `0` ^evaluates to `true`
… // this block is run.
}
remember Internet Explorer 8 doesnt understand indexOf.
But if nobody of your users uses ie8 (google analytics would tell you) than omit this answer.
possible solution to fix ie8:
How to fix Array indexOf() in JavaScript for Internet Explorer browsers