fmt_minus(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

✨ NAME ✨

okay bestie, say hi to fmt_minus(3) from the Library Functions Manual. Its whole personality? Writing a '-' for negative integers. That's the name, that's the game. πŸ’…


πŸŽ€ SYNTAX πŸŽ€

#include <libowfat/fmt.h>

size_t fmt_minus(char *dest,signed int source);

🌸 DESCRIPTION 🌸

so here's the tea, fr fr: fmt_minus writes '-' if source is negative. If source is not negative, it writes nothing. That's it. It returns the number of bytes written. πŸ‘‘

not me forgetting the null terminator: fmt_minus does not append \0. No cap. 🫢

if dest equals FMT_LEN (i.e. is zero), then fmt_minus returns the number of bytes it would have written. It's giving β€œjust the length, please” energy. 😭


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the page, bestie. The footer is just fmt_minus(3), and the source is the Library Functions Manual β€” no extra date/version line, so consider this your cute sign-off. periodt πŸ’–βœ¨