缓冲区操作Buffer Manipulation

通过以下例程逐字节使用内存区域。Use these routines to work with areas of memory on a byte-by-byte basis.

缓冲区操作例程Buffer-Manipulation Routines

例程Routine 使用Use
_memccpy_memccpy 将字符从一个缓冲区复制到另一个缓冲区,直到已复制给定字符或给定字符数Copy characters from one buffer to another until given character or given number of characters has been copied
memchr、wmemchrmemchr, wmemchr 在指定的字符数范围内,将指针返回到缓冲区中给定字符的第一个匹配项Return pointer to first occurrence, within specified number of characters, of given character in buffer
memcmp、wmemcmpmemcmp, wmemcmp 比较两个缓冲区中指定数量的字符Compare specified number of characters from two buffers
memcpy、wmemcpymemcpy_s、wmemcpy_smemcpy, wmemcpy, memcpy_s, wmemcpy_s 将指定数量的字符从一个缓冲区复制到另一个缓冲区Copy specified number of characters from one buffer to another
_memicmp、_memicmp_l_memicmp, _memicmp_l 在不考虑大小写的情况下比较两个缓冲区中指定数量的字符Compare specified number of characters from two buffers without regard to case
memmove、wmemmovememmove_s、wmemmove_smemmove, wmemmove,memmove_s, wmemmove_s 将指定数量的字符从一个缓冲区复制到另一个缓冲区Copy specified number of characters from one buffer to another
memset、wmemsetmemset, wmemset 使用给定的字符初始化缓冲区中指定数量的字节Use given character to initialize specified number of bytes in the buffer
_swab_swab 交换数据字节并将其存储在指定位置Swap bytes of data and store them at specified location

当源和目标区域重叠时,仅 memmove 可保证正确复制完整源。When the source and target areas overlap, only memmove is guaranteed to copy the full source properly.

另请参阅See Also

按类别分的运行时例程Run-Time Routines by Category