fmt_strn(3)
π fmt_strn(3) π
okay so bestie, welcome to the fmt_strn page, straight out of the Library Functions Manual β¨ she's a lil function that writes an ASCII string and she is, honestly, so chill.
πΈ NAME πΈ
fmt_strn β write an ASCII string π
β¨ SYNTAX β¨
#include <libowfat/fmt.h>
size_t fmt_strn(char *dest,const char *source,
size_t maxlen);
look at her. so demure. so mindful. π
π¦ DESCRIPTION π¦
fmt_str copies at most maxlen leading nonzero bytes from source to dest and returns the number of bytes it copied. no cap. π«Ά
not me pointing out that the page literally saysfmt_strthere and notfmt_strnπ i'm just the messenger bestie, i am not editing the source material. periodt.
fmt_str does not append \0. she said no terminator, no problems π (ok but fr fr: she is not null-terminating anything, so don't go expecting a \0 at the end of your dest, okay?)
and here's the iconic part: if dest equals FMT_LEN (i.e. is zero), fmt_strn returns the number of bytes it would have written. it's giving window shopping β she's not actually writing anything, just telling you how much she would have written if you'd let her β¨
π₯ SEE ALSO π₯
that's the whole page, bestie. she's short, she's sweet, she's from the Library Functions Manual, and she answers to the name fmt_strn(3) ππ¦π
no date, no version, no drama β just vibes and a manpage. slay β¨π
π¦ 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