Home | History | Annotate | Download | only in lib
      1 /*
      2  * stpcpy.c
      3  *
      4  * stpcpy()
      5  */
      6 
      7 #include <string.h>
      8 
      9 char *stpcpy(char *dst, const char *src)
     10 {
     11     char *q = dst;
     12     const char *p = src;
     13     char ch;
     14 
     15     for (;;) {
     16 	*q = ch = *p++;
     17 	if (!ch)
     18 	    break;
     19 	q++;
     20     }
     21 
     22     return q;
     23 }
     24