Answers for "How do I check if a string contains another string in Swift"

4

How do I check if a string contains another string in Swift

let string = "hello Swift"
if string.contains("Swift") {
    print("exists")
}
Posted by: Guest on January-30-2020

Code answers related to "How do I check if a string contains another string in Swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language