[4mSS8_COPY[24m(3) Ssstr Manual [4mSS8_COPY[24m(3)
[1mNAME[0m
ss8_copy, ss8_copy_cstr, ss8_copy_bytes, ss8_copy_ch, ss8_copy_ch_n -
copy a string or characters to an ssstr byte string
[1mSYNOPSIS[0m
[1m#include <ss8str.h>[0m
[1mss8str *ss8_copy(ss8str *restrict [4m[22mdest[24m[1m,[0m
[1mss8str const *restrict [4m[22msrc[24m[1m);[0m
[1mss8str *ss8_copy_cstr(ss8str *restrict [4m[22mdest[24m[1m,[0m
[1mchar const *restrict [4m[22msrc[24m[1m);[0m
[1mss8str *ss8_copy_bytes(ss8str *restrict [4m[22mdest[24m[1m,[0m
[1mchar const *restrict [4m[22msrc[24m[1m, size_t [4m[22msrclen[24m[1m);[0m
[1mss8str *ss8_copy_ch(ss8str *[4m[22mdest[24m[1m, char [4m[22mch[24m[1m);[0m
[1mss8str *ss8_copy_ch_n(ss8str *[4m[22mdest[24m[1m, char [4m[22mch[24m[1m, size_t [4m[22mcount[24m[1m);[0m
[1mDESCRIPTION[0m
[1mss8_copy[22m() copies the value of the [1mss8str [22mobject at [4msrc[24m to the [1mss8str[0m
object at [4mdest[24m. Behavior is undefined unless [4mdest[24m and [4msrc[24m point to a
valid and distinct [1mss8str [22mobjects.
[1mss8_copy_cstr[22m() copies the null-terminated byte string [4msrc[24m to the
[1mss8str [22mobject at [4mdest[24m. Behavior is undefined unless [4mdest[24m points to a
valid [1mss8str [22mobject and [4msrc[24m is a null-terminated byte string that does
not overlap with the internal buffer of [4mdest[24m.
[1mss8_copy_bytes[22m() copies the byte string of length [4msrclen[24m located at [4msrc[0m
to the [1mss8str [22mobject at [4mdest[24m. Behavior is undefined unless [4mdest[24m points
to a valid [1mss8str [22mobject and [4msrc[24m is not NULL and points to an array of
at least [4msrclen[24m bytes that does not overlap with the internal buffer of
[4mdest[24m.
[1mss8_copy_ch[22m() assigns the string consisting of the single byte [4mch[24m to
the [1mss8str [22mobject at [4mdest[24m. Behavior is undefined unless [4mdest[24m points to
a valid [1mss8str [22mobject.
[1mss8_copy_ch_n[22m() assigns the string consisting of [4mcount[24m copies of the
byte [4mch[24m to the [1mss8str [22mobject at [4mdest[24m. Behavior is undefined unless
[4mdest[24m points to a valid [1mss8str [22mobject.
[1mRETURN VALUE[0m
All 5 functions return [4mdest[24m.
[1mSEE ALSO[0m
[1mss8_cat[22m(3), [1mss8_copy_substr[22m(3), [1mss8_copy_to_bytes[22m(3),
[1mss8_copy_to_cstr[22m(3), [1mss8_init_copy[22m(3), [1mss8_move[22m(3), [1mss8_swap[22m(3),
[1mssstr[22m(7)
SSSTR 2023-12-30 [4mSS8_COPY[24m(3)