Check out example codes for "How do I check if a string contains another string in Swift". It will help you in understanding the concepts better.

Code Example 1

let string = "hello Swift"
if string.contains("Swift") {
    print("exists")
}

Learn ReactJs, React Native from akashmittal.com