replaceCharAt method

String replaceCharAt(
  1. String oldString,
  2. int index,
  3. String newChar
)

Implementation

String replaceCharAt(String oldString, int index, String newChar) {
  return oldString.substring(0, index) +
      newChar +
      oldString.substring(index + 1);
}