Store a C string in a persistent string¶
ss_string_set
is a function defined in ssstring.c.
Synopsis:
-
herr_t
ss_string_set
(ss_string_t *str, const char *s)¶
Formal Arguments:
str
: The destination persistent string.s
: The source C string to copy.
Description: Given a C-style NUL
-terminated character string stored in s
, make the persistent string object str
have that
same value. The ss_string_memset function can be used to store arbitrary data that might have embedded NUL
characters or that might not be NUL
-terminated.
Return Value: Returns non-negative on success and negative on failure. The success side effect is that str
has the same
value as s
.
Parallel Notes: Independent
See Also:
- ss_string_memset: 9.4: Store a byte array in a string
- Strings: Introduction for current chapter