Reverse a string


I have a string and want to reverse it (with all of its characters in the reverse order).


// String literal
let s = "Hello World"

// Reverse its characters

let reversed = String(s.characters.reverse())

Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)