我需要使用编码或解码或替换来删除它,以从字符串

时间:2017-02-13 17:41:26

标签: swift

我正在I\\U00b4m取代I'm。如何从字符串中解码或替换此\\U00b4

I\\U00b4m looking for the only one man in my life.

1 个答案:

答案 0 :(得分:-3)

简单方法:

let aString = "This is my string"
let newString = aString.replacingOccurrences(of: "\U00b4", with: "", options: .literal, range: nil)

此处有更多信息:Any way to replace characters on Swift String?