Sujeet Jaiswalblog.sujeet.proยทMar 20, 2023Length of a stringTL;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("๐ฉโ๐ฉโ๐ฆโ๐ฆ๐ฆ๏ธ...js