Swift Strings
Strings use \(value) interpolation. Members: count, uppercased(), lowercased(), hasPrefix, contains and replacingOccurrences. Multi line strings use triple quotes.
Example
let s = "Hello, Swift"
print(s.count, s.uppercased())
print("Length is \(s.count)")
print(s.contains("Swift"), s.hasPrefix("Hello"))Exercise
Count characters.
s.Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.