blob: cfbf5d4c911e08cad34a76f046401bb6db0798b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <ctype.h>
/* Replace char 'old' by char 'new' in source */
void chrreplace(char *source, char old, char new)
{
while (*source) {
if (source[0] == old) source[0]=new;
source++;
}
}
|