「Swift」文字列を置換するサンプル
1.文字列検索
let cft = “123fuymm"
let range = cft.range(of: “fuy")
print(cft[range!])
2.文字列置換
let cft = “123fuymm"
cft.replacingOccurrences(of: “fuy", with: “queq")
Coding Changes the World
1.文字列検索
let cft = “123fuymm"
let range = cft.range(of: “fuy")
print(cft[range!])
2.文字列置換
let cft = “123fuymm"
cft.replacingOccurrences(of: “fuy", with: “queq")