memcpy.c
来自「标准c库代码,可以应用于各个系统提供了大量的基本函数」· C语言 代码 · 共 56 行
C
56 行
/*FUNCTION <<memcpy>>---copy memory regionsANSI_SYNOPSIS #include <string.h> void* memcpy(void *<[out]>, const void *<[in]>, size_t <[n]>);TRAD_SYNOPSIS void *memcpy(<[out]>, <[in]>, <[n]> void *<[out]>; void *<[in]>; size_t <[n]>;DESCRIPTION This function copies <[n]> bytes from the memory region pointed to by <[in]> to the memory region pointed to by <[out]>. If the regions overlap, the behavior is undefined.RETURNS <<memcpy>> returns a pointer to the first byte of the <[out]> region.PORTABILITY<<memcpy>> is ANSI C.<<memcpy>> requires no supporting OS subroutines.QUICKREF memcpy ansi pure*/#include <_ansi.h>#include <stddef.h>_PTR_DEFUN (memcpy, (out, in, length), _PTR out _AND _CONST _PTR in _AND size_t length){ char *dst = (char *) out; char *src = (char *) in; _PTR save = out; while (length--) { *dst++ = *src++; } return save;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?