Get the Length of String in Swift
Last Updated: September 27, 2017
You can get the length of the string following way
var str: String = "string 1 " print ("Length of the string : \(str.characters.count)")
Output
Length of the string : 9