STRCPY
Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Å´º¾ó (3)
Updated: 1993³â 4¿ù 11ÀÏ
Index
Return to Main Contents
NAME
strcpy, strncpy - ¹®ÀÚ¿ º¹»çÇϱâ.
SYNOPSIS
#include <string.h>
char *strcpy(char *dest, const char *src);
char *strncpy(char *dest, const char *src, size_t n);
DESCRIPTION
strcpy() ÇÔ¼ö´Â src(`\0' ¹®ÀÚ¸¦ Æ÷ÇÔ)°¡ °¡¸®Å°´Â ¹®ÀÚ¿À»
dest°¡ °¡¸®Å°´Â ¹è¿¿¡ º¹»çÇÑ´Ù.
¹®ÀÚ¿À» °ãÃÄÁöÁö ¾ÊÀ¸¸ç ¸ñÀûÁö ¹®ÀÚ¿ dest´Â º¹»ç ¹ÞÀ» Á¤µµ·Î
ÃæºÐÈ÷ Ä¿¾ß ÇÑ´Ù.
strncpy() ÇÔ¼ö´Â srcÀÇ n¹ÙÀÌÆ®¸¸À» º¹»çÇÑ´Ù´Â °ÍÀ»
Á¦¿ÜÇÏ°í ºñ½ÁÇÏ´Ù. ¸¸ÀÏ srcÀÇ Ã³À½ n ¹ÙÀÌÆ®Áß nullÀÌ ¾ø´Ù¸é,
°á°ú´Â null-Á¾·á°¡ ¾ÈµÉ¼ö ÀÖ´Ù.
src
ÀÇ ±æÀÌ°¡
nº¸´Ù
ÀÛÀº °æ¿ì,
dest
ÀÇ ³ª¸ÓÁö´Â null·Î ÆеåµÈ´Ù.
RETURN VALUE
strcpy()¿Í strncpy() ÇÔ¼ö´Â ¸ñÀûÁö ¹®ÀÚ¿ dest¿¡ ´ëÇÑ
Æ÷ÀÎÅ͸¦ ¹ÝȯÇÑ´Ù.
BUGS
strcpy()ÀÇ ¸ñÀûÁö ¹®ÀÚ¿ÀÌ ÃæºÐÈ÷ Å©Áö ¾Ê´Ù¸é(Áï, ÇÁ·Î±×·¡¸Ó°¡
¾î¸®¼®°Å³ª °ÔÀ¸¸£´Ù¸é, º¹»çÇϱâ Àü¿¡ Å©±â¸¦ °Ë»çÇÏÁö ¾ÊÀ» °ÍÀÌ´Ù),
¾î¶°ÇÑ ÀÏÀÌ ¹ß»ýÇÒ¼ö ÀÖ´Ù.
°íÁ¤µÈ ±æÀÌÀÇ ¹®ÀÚ¿ ¿À¹ö Ç÷οì´Â Áñ°Ü ¾²¿©Áö´Â Å©·¡Ä¿ ±â¼úÀÌ´Ù.
CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO 9899
SEE ALSO
bcopy(3), memccpy(3), memcpy(3), memmove(3)
¿ªÀÚ
Á¤°ÈÆ <skyeyes@soback.kornet.net>, 2001³â 2¿ù 20ÀÏ
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- BUGS
-
- CONFORMING TO
-
- SEE ALSO
-
- ¿ªÀÚ
-
This document was created by
man2html,
using the manual pages.
Time: 08:07:01 GMT, March 25, 2004