fmt_copybytes(3)

πŸ’– fmt_copybytes β€” a manual page, but make it cute πŸ’–

okay so bestie, welcome to fmt_copybytes(3) from the Library Functions Manual 🫢 this one is short, sweet, and honestly kind of a slay. let's get into it.


✨ NAME ✨

fmt_copybytes β€” write binary data πŸ’Ύβœ¨

like. literally just copy some bytes. that's the whole job. and she does it flawlessly.


🌸 SYNTAX 🌸

#include <libowfat/fmt.h>

size_t fmt_copybytes(char *dest,const char *source, size_t limit);

look at that signature. clean. iconic. no notes. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie β˜• β€” fmt_copybytes copies limit bytes from source to dest and returns limit. that's it. that's the function. she copies, she returns the number, she leaves. main character behaviour, honestly πŸ’…

ngl this one is a convenience wrapper interface around memcpy / byte_copy, and the whole reason she exists is to make byte-copying work like all the other fmt functions do 🌈 so if you're already vibing in fmt-land and you need a raw byte copy that matches the rest of the crew, she's your girl. no cap.

fr fr: she returns limit, not something else. don't overthink it. the way that limit goes in and limit comes back out is lowkey poetic πŸŽ€

🌟 SEE ALSO 🌟

go say hi to the cousins, they're family πŸ’œ


and that's the whole page!! πŸ’– signed off the way it always is β€” fmt_copybytes(3), out here repping the Library Functions Manual, and that's periodt. ✨🧚πŸ’