Write a program that replaces the character in a given position in a string.
Each line of input will consist of a string s, a natural number i and a character c.
For each line of input, there should be a line of output with a modified version of string s where the character at position i is replaced by character c.
String s is alphanumeric and is of up to 60 characters. This string is indexed from zero.
0 < |s| ≤ 60
0 ≤ i < |s|
Hallo 1 e
Bach 3 k
bitter 1 u
Hello
Back
butter
try first: index-string
try next: digit-sum
Copyright © 2020-2022 Rudy Matela
This text is available under the CC BY-SA 4.0 license.
Originally available on cscx.org/replace