RosettaCodeData/Task/Reverse-a-string/Wren/reverse-a-string.wren

11 lines
363 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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())
}