home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / s / smc21lib.lzh / REVERSE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-25  |  256 b   |  19 lines

  1.  
  2. #define NOCCARGC
  3. /*
  4. ** Reverse a string in place.
  5. */
  6. reverse(s) char *s; {
  7.   char *j;
  8.   int c;
  9.   j = s + strlen(s) -1;
  10.   while(s < j) {
  11.     c = *s;
  12.     *s++ = *j;
  13.     *j-- = c;
  14.     }
  15.   }
  16.  
  17.  
  18.  
  19. CCDECI, CCINCI, CCDDPI, CCPDPI, CCPINT, PINTè