Sets maximal dmax characters of dest to a character value, but not the final NULL character.
With SAFECLIB_STR_NULL_SLACK defined all elements following the terminating null character (if any) written in the array of dmax characters pointed to by dest are nulled.
- Parameters
-
[out] | dest | string that will be set. |
[in] | dmax | restricted maximum length of dest |
[in] | value | character value to write |
- Precondition
- dest shall not be a null pointer, and shall be null-terminated.
-
dmax shall not be greater than RSIZE_MAX_STR.
-
dmax shall not equal zero.
-
value shall not be greater than 255
- Return values
-
EOK | when successful |
ESNULLP | when dest is NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR or value > 255 |
- See also
- strzero_s(), strnset_s(), strispassword_s()