byte_copyr(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

byte_copyr πŸ’–

okay bestie, so this is a page from the Library Functions Manual (that's the fancy little family it lives in), and it's about copying strings β€” but like, backwards. yes. backwards. we love a quirky queen. πŸ‘‘


✨ NAME ✨

byte_copyr β€” copy a string πŸ¦‹


✨ SYNTAX ✨

no cap, here's literally the whole thing you gotta write:

#include <libowfat/byte.h>

void byte_copyr(char *out,size_t len,const char *in);

so you're passing an out pointer, a len, and an in pointer. that's it. that's the whole vibe. πŸŽ€


✨ DESCRIPTION ✨

okay so here's the tea, and it's giving reverse order:

  • byte_copyr copies in[len-1] to out[len-1] 🫢
  • then it copies in[len-2] to out[len-2] ✨
  • and so on and so on, walking backwards through the bytes, lowkey iconic πŸ’…
  • ...all the way down until it copies in[0] to out[0] 🌸

so like, it copies the bytes from the end to the beginning. last byte first, first byte last. main character energy, honestly. πŸ’–


✨ SEE ALSO ✨

  • byte_copy(3) β€” the forwards version, if you're not feeling the backwards vibe πŸ¦‹

and that's the whole page bestie, fr fr β€” it's <code>byte_copyr(3)</code>, living in the Library Functions Manual, and that's the little sign-off footer it wears at the very bottom. periodt. πŸ’œ