home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / SSTRCPY.C < prev    next >
C/C++ Source or Header  |  1997-07-05  |  490b  |  29 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  strcpy() and strcat() work-alikes which allow overlapping buffers.
  5. */
  6.  
  7. #include <string.h>
  8. #include "snip_str.h"
  9.  
  10. #if defined(__cplusplus) && __cplusplus
  11.  extern "C" {
  12. #endif
  13.  
  14. char *sstrcpy(char *to, char *from)
  15. {
  16.     memmove(to, from, 1+strlen(from));
  17.     return to;
  18. }
  19.  
  20. char *sstrcat(char *to, char *from)
  21. {
  22.     sstrcpy(to + strlen(to), from);
  23.     return to;
  24. }
  25.  
  26. #if defined(__cplusplus) && __cplusplus
  27.  }
  28. #endif
  29.