home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / stg_v4.lzh / strcut.c < prev    next >
C/C++ Source or Header  |  1994-11-11  |  342b  |  29 lines

  1. char *
  2. strcut(s,c)
  3. char *s;
  4. int c;
  5. {
  6.     if (!s) return(0);
  7.     if (!c) goto white;
  8.     while (*s)
  9.     {
  10.         if (*s==c)
  11.         {
  12.             *s++=0;
  13.             return(s);
  14.         }
  15.         s++;
  16.     }
  17.     return(0);
  18. white:
  19.     while (*s)
  20.     {
  21.         if (*s==' ' || *s==9 || *s==13 || *s==10)
  22.         {
  23.             while (*s==' ' || *s==9 || *s==13 || *s==10)
  24.                 *s++=0;
  25.             return(s);
  26.         }
  27.     }
  28. }
  29.