Store a byte array in a string¶
ss_string_memset
is a function defined in ssstring.c.
Synopsis:
-
herr_t
ss_string_memset
(ss_string_t *str, const void *value, size_t nbytes)¶
Formal Arguments:
str
: The destination variable length string.value
: The optional value to assign tostr
. IfNULL
then a value of all zero bytes is used.nbytes
: The number of bytes invalue
.
Description: This function is similar to ss_string_set except the number of bytes in value
is explicitly passed instead
of looking for the first NUL
character.
Return Value: Returns non-negative on success and negative on failure.
Parallel Notes: Independent
See Also:
- ss_string_set: 9.3: Store a C string in a persistent string
- Strings: Introduction for current chapter