The functions listed in Folowing Table initialize, copy, search, and compare blocks of memory. The functions declared in the header string.h access a memory block byte by byte, while those declared in wchar.h read and write units of the type wchar_t. Accordingly, the size parameter of each function indicates the size of a memory block as a number of bytes, or as a number of wide characters.Functions to manipulate blocks of memory.
|Purpose||Functions in string.h||Functions in wchar.h|
|Copy a memory block, where source and destination do not overlap||memcpy( )||wmemcpy( )|
|Copy a memory block, where source and destination may overlap||memmove( )||wmemmove( )|
|Compare two memory blocks||memcmp( )||wmemcmp( )|
|Find the first occurrence of a given character||memchr( )||wmemchr( )|
|Fill the memory block with a given character value||memset( )||wmemset( )|