remove digits from string */
| 518 | |
| 519 | /* remove digits from string */ |
| 520 | char * |
| 521 | stripdigits(char *s) |
| 522 | { |
| 523 | char *s1, *s2; |
| 524 | |
| 525 | for (s1 = s2 = s; *s1; s1++) |
| 526 | if (*s1 < '0' || *s1 > '9') |
| 527 | *s2++ = *s1; |
| 528 | *s2 = '\0'; |
| 529 | |
| 530 | return s; |
| 531 | } |
| 532 | |
| 533 | /* substitute a word or phrase in a string (in place); |
| 534 | caller is responsible for ensuring that bp points to big enough buffer */ |