The number of characters that make up a string is the length of that string. We can find this in Swift through the count
property. It returns this number.
string.count
The value returned is an integer. It is the number of characters a string has.
// create stringslet str1 = "Edpresso"let str2 = "is"let str3 = "awesome!"let str4 = ""// check length of strings// and print resultprint(str1.count) // 8print(str2.count) // 2print(str3.count) // 8print(str4.count) // 0
count
property and print the results.