Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>stpcpy</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
stpcpy

Usage

   #include <string.h>
   char *stpcpy(char *s1, char *s2);

Description

   The stpcpy function copies the string pointed to by s2 into the buffer
   pointed to by s1. It is similar to the normal library strcpy() function
   except that it returns a pointer to the end of the copied string. This is
   useful when concatenating strings.

Example 

   #include <stdio.h>
   #include <string.h>
   #include <stdlib.h>

   int main()

   {
       char s1[8] = "Eu", *s2 = "re", *s3 = "ka";
       stpcpy(stpcpy(stpcpy(s1,s2), s3), "!");
       puts(s1);       /* prints "Eureka!"     */
       return EXIT_SUCCESS;
   }

Return Value

   A pointer to the end of the copied string

See Also

   strcpy



See Also: strcpy

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson