stpcpy

Copies a string and returns a pointer to its end.

Library:LibC
Classification:Linux
Service:Characters and Strings

Syntax

  #include <string.h> 
   
  char *stpcpy (
     char         *dst,
     const char   *src );
  

Parameters

dst

(OUT) Points to the array into which to copy the string.

src

(IN) Points to the string to be copied.

Return Values

Returns a pointer to the null-terminating character in the destination string.

Remarks

The stpcpy function build strings easier and faster than the strcpy function can.The src and dst strings cannot overlap. The dst buffer must be large enough for the src string, including the null-terminating character.

See Also