home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 273_01 / strxform.cc < prev    next >
Encoding:
Text File  |  1987-10-06  |  249 b   |  11 lines

  1. str_xform(char *str,char from,char to)
  2. /* This function will transform all characters in the string pointed to
  3.    by *str that are the same as the from character to the to char.
  4. */
  5. {
  6.     while(*str) {
  7.         if(*str==from) *str=to;
  8.         str++;
  9.     }
  10. }
  11.