SS8_INIT_COPY(3) Ssstr Manual SS8_INIT_COPY(3) NAME ss8_init_copy, ss8_init_copy_cstr, ss8_init_copy_bytes, ss8_init_copy_ch, ss8_init_copy_ch_n - initialize an ssstr byte string from a string or characters SYNOPSIS #include <ss8str.h> ss8str *ss8_init_copy(ss8str *restrict str, ss8str const *restrict src); ss8str *ss8_init_copy_cstr(ss8str *restrict str, char const *restrict src); ss8str *ss8_init_copy_bytes(ss8str *restrict str, char const *restrict src, size_t len); ss8str *ss8_init_copy_ch(ss8str *str, char ch); ss8str *ss8_init_copy_ch_n(ss8str *str, char ch, size_t count); DESCRIPTION ss8_init_copy() initializes the ss8str object that str points to, and sets its value to a copy of the value of the ss8str object at src. Be‐ havior is undefined unless str points to an invalid (that is, unini‐ tialized or previously freed) ss8str object and src points to a valid ss8str object. ss8_init_copy_cstr() initializes the ss8str object at str and sets its value to a copy of the null-terminated byte string src. Behavior is undefined unless str points to an invalid ss8str object and src is a null-terminated byte string. ss8_init_copy_bytes() initializes the ss8str object at str and sets its value to a copy of the byte string of length len located at src. Be‐ havior is undefined unless str points to an invalid ss8str object and src points to an array of at least len bytes. ss8_init_copy_ch() initializes the ss8str object at str and sets its value to the string consisting of the single byte ch. Behavior is un‐ defined unless str points to an invalid ss8str object. ss8_init_copy_ch_n() initializes the ss8str object at str and sets its value to the string consisting of count copies of the byte ch. Behav‐ ior is undefined unless str points to an invalid ss8str object. RETURN VALUE All 5 functions return str. SEE ALSO ss8_copy(3), ss8_destroy(3), ss8_init(3), ss8_init_move(3), ssstr(7) SSSTR 2023-12-30 SS8_INIT_COPY(3)