buffer_get_token(3)
π buffer_get_token(3) π
okay bestie, welcome to the Library Functions Manual β today's main character is buffer_get_token, and she is literally the token-grabbing queen πβ¨
πΈ NAME πΈ
buffer_get_token β read token from buffer π
β¨ SYNTAX β¨
#include <libowfat/buffer.h>
ssize_t buffer_get_token(buffer* b,char* x,size_t len,
const char* charset,size_t setlen);
like. she's giving five arguments and zero apologies π
π¦ DESCRIPTION π¦
okay so here's the vibe π«Ά β buffer_get_token copies data from b over into x[0], x[1], ..., x[len-1], and she keeps going until either:
lenbytes have been copied, or- one of
charset[0],charset[1], ...,charset[setlen]equals the last byte that was read π₯
basically she's slurping bytes until she hits a character you told her is a stopping point, or until the destination is full. no cap.
then she returns the number of bytes read π β or -1 on error, and when that happens she sets errno appropriately, because she's messy but she's accountable ππ
π SEE ALSO π
go read those too, they're all part of the same friend group fr fr π§
and that's the whole page, bestie π this lil cutie came from the Library Functions Manual, and she goes by buffer_get_token(3) β periodt πβ¨π
π¦ 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