I have a string like this in Swift:
var stringts:String = \"3022513240\"
If I want to change it to string to something like this: \"(
\"(
var phone= "+9945555555" var indx = phone.index(phone.startIndex,offsetBy: 4) phone.insert("-", at: indx) index = phone.index(phone.startIndex, offsetBy: 7) phone.insert("-", at: indx)
var phone= "+9945555555"
var indx = phone.index(phone.startIndex,offsetBy: 4)
phone.insert("-", at: indx)
index = phone.index(phone.startIndex, offsetBy: 7)
//+994-55-55555