📜  swift 用空格替换换行符 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:59.639000             🧑  作者: Mango

代码示例1
let myString = "This \n is a st\tri\rng"
let trimmedString = myString.components(separatedBy: .whitespacesAndNewlines).joined()