「Swift」replaceSubrange()で指定文字列を置換するサンプル
サンプルコード
let cft:String = "this is a test data"
while(range:Range = cft.range(of: st)){
cft.replaceSubrange(range, with:"info")
}
print(cft)
Coding Changes the World
サンプルコード
let cft:String = "this is a test data"
while(range:Range = cft.range(of: st)){
cft.replaceSubrange(range, with:"info")
}
print(cft)