Answers for "how to compare to string in swift if they have some parts the same"

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 "how to compare to string in swift if they have some parts the same"

Code answers related to "Swift"

Browse Popular Code Answers by Language