Answers for "string comparison swift"

0

swift compare strings

print("foo".elementsEqual("bar")) //false
Posted by: Guest on December-23-2020
0

how to compare two strings in swift

let str1 = "Hello, world!"
let str2 = "I love Swift."
let str3 = "Hello, world!"

// compare str1 and str2
print(str1 == str2)

// compare str1 and str3
print(str1 == str3)
Posted by: Guest on May-07-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language