Comment

Comment by CHsurfer

char* convert(char* str, char find, char replace){

    char *current_pos = strchr(str,find);

    while (current_pos){

        *current_pos = replace;

        current_pos = strchr(current_pos,find);

    }

    return str;
}

convert("H264", "4", "5")

parent CHsurfer 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton