import Foundation
// Define the string we want to search in
let s = "swiftlang"
// Check for a character using contains()
let hasS = s.contains("s") // true
let hasZ = s.contains("z") // false
// Print the raw boolean results
print(hasS)
print(hasZ)
// Conditional check
if s.contains("s") {
print("exists")
} else {
print("not exists")
}
/*
run:
true
false
exists
*/