To check if a string contains a specific character in Swift, you can use the 'contains' method of the String class.
In this example,
let str = "Hello World"
let ch: Character = "W"
let contains = str.contains(ch)
print("String contains character '\(ch)': \(contains)")
String contains character 'W': true
In this tutorial, we learned How to Check if String contains specific Character in Swift language with well detailed examples.