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
Was this helpful?