Greg Hartman | 76d05dc | 2016-11-23 15:51:27 -0800 | [diff] [blame] | 1 | #include <ctype.h> |
2 | |||||
3 | /* Replace char 'old' by char 'new' in source */ | ||||
4 | void chrreplace(char *source, char old, char new) | ||||
5 | { | ||||
6 | while (*source) { | ||||
7 | source++; | ||||
8 | if (source[0] == old) source[0]=new; | ||||
9 | } | ||||
10 | } | ||||
11 |