Length of a string
TL;DR
'๐ฉโ๐ฉโ๐ฆโ๐ฆ๐ฆ๏ธ๐ง๐ปโโ๏ธ'.length is 21 instead of 3 because JS gives length UTF-16 code units and icons are a combination of more than one of such code units. Use Intl.Segmenter to get the length of rendered graphemes.
console.log("๐ฉโ๐ฉโ๐ฆโ๐ฆ๐ฆ๏ธ...
blog.sujeet.pro3 min read