Below is the following line of code I use to replace an HTML break tag with a carriage return. However, I have other HTML symbols that I need to replace and when I call this lin
As @matt mentioned you are starting over with the same content
string. The stringByReplacingOccurrencesOfString method doesn't actually change anything in the original content
string. It returns to you a new string with the replacement changes while content
remains unchanged.
Something like this should work for you
let result1 = content.stringByReplacingOccurrencesOfString("
", withString:"\r")
let result2 = result1.stringByReplacingOccurrencesOfString(" ", withString:" ")
textView.text = result2