替换指定位置的字符
# 替换指定位置的字符
```java
/** * @param index: 要替换的位置 * @param res: 原字符串 * @param str: 准备要替换的字符、字符串 * @return: 替换指定位置的字符 */
private static String replaceIndex(int index,String res,String str){
return res.substring(0, index)+str+res.substring(index+1);
}
