I have a String I am displaying in a UILabel and it has what seems to be several line breaks.
Here is the link to the raw JSON data (text is in key "
"flavor_text":"Bulbasaur can be seen napping in bright sunlight.\nThere is a seed on its back. By soaking up the sun\u2019s rays,\nthe seed grows progressively larger."
myUILabel.text = flavorText.trimmingCharacters(in: .whitespacesAndNewlines)
Have you try with
myUILabel.text = flavorText.replacingOccurrences(of target: "\n", with replacement: "")