May 7, 2022
If youâre using PHPâs strlen
or mb_strlen
functions, some emojis will still be counted as multiple characters because of the way that unicode encodes emojis.
Instead, you can use the grapheme_strlen
function, which counts all emojis only as one character. It counts a stringâs length in âgraphemeâ units, which are âthe smallest functional unit of a writing system.â
PHP documentation for grapheme_strlen
can be found here.
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iâm working on!