.contains()

let name = String::from("ElementalX"); name.contains("Element") // => true 

Checks if the substring is contained inside the original string or not.

Comments