compare string swift code example Example: swift compare strings print("foo".elementsEqual("bar")) //false