我如何用另一个替换字符串的第n个字符?
原文链接:https://www.f2er.com/swift/318810.htmlfunc replace(myString:String,index:Int,newCharac:Character) -> String { // Write correct code here return modifiedString }
例如,replace(“House”,2,“r”)应等于“Horse”.