Reverse a string

Raku handles graphemes, multi-byte characters and emoji correctly by default.

say "hello world".flip;
say "as⃝dfΜ…".flip;
say '℡ΑΩ 駱駝道 πŸ€” πŸ‡ΈπŸ‡§ πŸ‡ΊπŸ‡Έ πŸ‡¬πŸ‡§β€ πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦πŸ†—πŸ—Ί'.flip;

Output:

dlrow olleh
fΜ…ds⃝a
πŸ—ΊπŸ†—πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ πŸ‡¬πŸ‡§β€ πŸ‡ΊπŸ‡Έ πŸ‡ΈπŸ‡§ πŸ€” 道駝駱 ΩΑ℡

Last updated