summaryrefslogtreecommitdiff
path: root/com32/lib/chrreplace.c
blob: 65786f94ff980fc67030ff3c879391ff793601f5 (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) { 
	source++;
	if (source[0] == old) source[0]=new;
    }
}