by CHsurfer · 6y ago · 0 comments
char *current_pos = strchr(str,find);
while (current_pos){
*current_pos = replace;
current_pos = strchr(current_pos,find);
}
return str;
}convert("H264", "4", "5")
char* convert(char* str) { str[3] = "5"; return str; }
I tried it with your testcase and it worked, so it passes 100% of the tests I've ran.