fmt_longlong(3)
β¨ NAME β¨
fmt_longlong β write an ASCII representation of a long long integer π
okay bestie, so this is the one that turns your big ol' long long number into actual readable text. no cap.
πΈ SYNTAX πΈ
#include <libowfat/fmt.h>
size_t fmt_longlong(char *dest,long long source);
like, that's the whole vibe. include the header, call the function, boom. π«Ά
π DESCRIPTION π
so fmt_longlong writes an ASCII representation of source to dest β and when we say ASCII we mean literally just '-' and '0' to '9', base 10, the classic decimal glow-up. β¨
then it returns the number of bytes it wrote. that's your count, bestie. keep it.
one thing: fmt_longlong does not append \0. not a single null byte. she simply will not terminate your string for you. that's a you problem, and by you i mean please handle it. π
if dest equals FMT_LEN β which, iykyk, means it's zero β then fmt_longlong returns the number of bytes it would have written. it's giving window shopping. it's giving "just tell me how much it'd cost." π
and for convenience, fmt.h defines the integer FMT_LONG to be big enough to contain every possible fmt_longlong output plus \0. so like. use that. she ate. π
heads up: if you forget that\0thing and just printdestraw, that's on you. the function is not gonna save you. periodt.
π¦ SEE ALSO π¦
scan_longlong(3)β the reverse girly. reads it back. the duo, fr fr. π
and that's the whole page!! written for the Library Functions Manual, filed under fmt_longlong(3) β mwah, slay, go format some integers bestie ππβ
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms