Get the length of a string

 Problem

I have a String and want to calculate its length



 Recipe


// String literal
let s = "Hello world"

// Get the length of the string

let length = s.characters.count
print(length)

				


 Playground