Created
October 23, 2020 15:05
-
-
Save tkausch/00bb12a9973a4a41a04482818848ab29 to your computer and use it in GitHub Desktop.
How to reverse a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let str = "Hello, world!" | |
let reversed = String(str.reversed()) | |
print(reversed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment