home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / s / snip1292.zip / XSTRCAT.C < prev    next >
C/C++ Source or Header  |  1991-07-19  |  440b  |  26 lines

  1. /*
  2. **  string concatenation function
  3. */
  4.  
  5. #include <stdarg.h>
  6.  
  7. char *xstrcat(char *des, char *src, ...)
  8. {
  9.         char *destination = des;
  10.         va_list v;
  11.  
  12.         va_start(v, src);
  13.  
  14.         while (src != 0)
  15.         {
  16.                 while (*src != 0)
  17.                         *des++ = *src++;
  18.                 src = va_arg(v, char *);
  19.         }
  20.         *des = 0;
  21.  
  22.         va_end(v);
  23.  
  24.         return destination;
  25. }
  26.