Query the length of a persistent string¶
ss_string_memlen
is a function defined in ssstring.c.
Synopsis:
-
size_t
ss_string_memlen
(const ss_string_t *str)¶
Description: Given a persistent string, return the number of characters contained in that string, including the terminating NUL
character if any. Note that for NUL
terminated strings this is one more than what strlen
would have
returned, but this behavior is necessary since SSlib byte-counts all string data in order to allow strings
that have embedded NUL
characters and that might lack a NUL
terminator. In other words, SSlib strings can
store any type of data.
Return Value: On success, returns the actual number of bytes stored for the string including a NUL
terminator if any.
Returns SS_NOSIZE
on error.
Parallel Notes: Independent
See Also:
- Strings: Introduction for current chapter