Sets all characters in a string to a specified character, up to but not including the null-terminator.
#include <string.h> char *strset (char *string, int c); char *_strset (char *string, int c); wchar_t *_wcsset(wchar_t *string, wchar_t c); errno_t _strset_s(char *string, size_t strsize, int c); errno_t _wcsset_s(wchar_t *string, rsize_t strsize, wchar_t c);
string
strsize
string
in characters.
c
The function strset
does not set the terminating null character \0 to c
. _strset
is an alternate name for strset.
The _strset_s
function sets .
strset, _strset, _wcsset
_strset_s, _wcsset_s
string
is a null pointer, or strsize
is less than or equal to zero, or the block indicated by the string
and strsize
parameters is not null-terminated, then these functions return E_INVAL.tchar.h routine |
_UNICODE not defined |
_UNICODE defined |
---|---|---|
_tcsset | strset | wcsset |
_tcsset_s | _strset_s | _wcsset_s |
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 INtime 6.0 (wide-character and generic text routines) |
intime/rt/include/string.h intime/rt/include/wchar.h intime/rt/include/tchar.h |
string.h wchar.h tchar.h |
clib.lib |