SyntaxFix
Write A Post
Hire A Developer
Questions
var str = "Hello, playground" let indexcut = str.firstIndex(of: ",") print(String(str[..<indexcut!])) print(String(str[indexcut!...]))
You can try in this way and will get proper results.