Get the length of a string


I have a String and want to calculate its length


// String literal
let s = "Hello world"

// Get the length of the string

let length = s.characters.count


Heard the news?

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