INtime SDK Help
memset, memset_s, wmemset, wmemset_s

Sets characters in a buffer to a specified character.

#include <string.h>

void *memset (void *dest, int c, size_t count);
errno_t memset_s(void *dest, size_t destsize, int c, size_t count);
        
#include <wchar.h>
        
wchar_t *wmemset(wchar_t *dest, wchar_t c, size_t count);
errno_t memset_s(void *dest, size_t destsize, wchar_t c, size_t count);

Parameters

dest
Pointer to destination.
destsize
maximum size of destination buffer in characters (bytes for memset and memset_s, wide characeters for wmemset and wmemset_s).
c
Character to set to.
count
Number of characters to set (bytes for memset and memset_s, wide characeters for wmemset and wmemset_s).

Remarks

The memset_s and wmemset_s functions are subject to contraints:

If there is a runtime-constraint violation, the memset_s function stores the value of c (converted to an unsigned char) into each of the first destmax characters of the object pointed to by dest if dest is not a null pointer and destmax is not greater than RSIZE_MAX.

Return Values

memset returns the destination address pointer dest.

memset_s returns 0 on successful completion, else a non-zero value.

Requirements

Versions Defined in Include Link to
INtime 3.0
INtime 4.2 (memset_s)
INtime 6.0 (for wide-character functions)
intime/rt/include/string.h

intime/rt/include/wchar.h
string.h

wchar.h
clib.lib
See Also