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
No responses yet.