Keil Logo


#include <string.h>

char *strcpy (
  unsigned char *dst,          /* destination string */
  const unsigned char *src);   /* source string */

The strcpy function copies characters from src to dst up to and including the terminating null character.

Return Value

The strcpy function returns dst.

See Also

strcat, strlen, strncat, strncpy

#include <string.h>
#include <stdio.h> /* for printf */

void tst_strcpy (void) {

  unsigned char buf [21];
  unsigned char s [] = "Test String";

  strcpy (buf, s);
  strcat (buf, " #2");

  printf ("new string is %s\n", buf);
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.