Swift Remplacez Newlines par l'espace

let myString = "This \n is a st\tri\rng"
let trimmedString = myString.components(separatedBy: .whitespacesAndNewlines).joined()
Annoying Angelfish