how to get length of string in swift code example
Example 1: Get the length of a String swift
var test1: String = "Scott"
test1.count
Example 2: Find length of string in swift
let message = "Hello, World!"
// count length of a string
print(message.count) // 13