3 ms·
How does that solution compare to something like this? char *copy_to = z_terminated; while(1) { if(*z_terminated == char_to_remove) z_te
by what 16y ago
How does that solution compare to something like this?
char *copy_to = z_terminated;
while(1) {
if(*z_terminated == char_to_remove)
z_terminated++;
else if((*copy_to++ = *z_terminated++) == '\0')
break;
}
Yeah, I know, it will break if char_to_remove is the zero-terminator or z_terminated is NULL.