RosettaCodeData/Task/Reverse-a-string/Wren/reverse-a-string.wren
2023-07-01 13:44:08 -04:00

10 lines
363 B
Text

import "/str" for Str
import "/upc" for Graphemes
for (word in ["asdf", "josé", "møøse", "was it a car or a cat I saw", "😀🚂🦊"]) {
System.print(Str.reverse(word))
}
for (word in ["as⃝df̅", "ℵΑΩ 駱駝道 🤔 🇸🇧 🇺🇸 🇬🇧‍ 👨‍👩‍👧‍👦🆗🗺"]) {
System.print(Graphemes.new(word).toList[-1..0].join())
}