📅  最后修改于: 2022-03-11 15:01:01.304000             🧑  作者: Mango
extension String {
func withReplacedCharacters(_ oldChar: String, by newChar: String) -> String {
let newStr = self.replacingOccurrences(of: oldChar, with: newChar, options: .literal, range: nil)
return newStr
}
}