0

Why following code is not running ?

hasPrefix and hasSufix method var str1 = "Information Technology" var str2 = "Technology" if str1.hasSufix(str2) { print("stt1 is sub string of str1") }

30th May 2019, 4:00 PM
Malhar Naiya
Malhar Naiya - avatar
1 Answer
+ 2
I tried this example: https://www.dotnetperls.com/hasprefix-swift It is also not working. Maybe it has to do with the swift version. I don't know which version sololearn uses.
30th May 2019, 5:19 PM
Denise Roßberg
Denise Roßberg - avatar