Course of Raku / Advanced / More about built-in types / Strings / Exercises / Reverse and shout
Solution: Reverse and shout
Here is a possible solution to the task.
Code
say 'raku'.flip.uc;🦋 You can find the source code in the file reverse-and-shout.raku.
Output
UKARComments
The methods are applied left to right:
flipfirst reverses'raku'into'ukar', and thenucturns it into'UKAR'.Because each method returns a new string, you can chain them in a single expression.
Course navigation
← Reverse and shout | Acronym →