INtime SDK Help
strset

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);

Parameters

string
String to be set.
strsize
Size of buffer pointed to by string in characters.
c
Character to set the string to.

Remarks

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 .

Return Values

strset, _strset, _wcsset
Returns a pointer to the altered string.
_strset_s, _wcsset_s
Returns 0 if successful.
If 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.

Generic Text Routines

tchar.h routine _UNICODE not defined _UNICODE defined
_tcsset strset wcsset
_tcsset_s _strset_s _wcsset_s

Requirements

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
See Also