News for hackers. Stuff that matters.
Re:Why can't you reverse a string with a flag emoji? by zanzibar735 on Thursday January 27, 2022 @03:18PM (#30105858)
Of course you can reverse a string with a flag emoji. You just need to treat a "string" as a collected of Extended Grapheme Clusters, and then you reverse the order of the EGCs. So if the string is `a<flag unicode bytes>b`, the output should be `b<flag unicode bytes>a`.

There are no comments on this comment yet.