I have string which contains few \
and I want to remove all of them. can anyone tell me how can I do that. I have already tried stringByReplacingOccurrencesOfString
but it's not working out for me.
var str = "\\dagdahughuad\\dajughdaug"
var str2 = str.stringByReplacingOccurrencesOfString("\\", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil)
print(str2)
This will output
dagdahughuaddajughdaug