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

πŸ’– scan_whitenskip β€” NAME πŸ’–

okay bestie, this one's called scan_whitenskip, and it's a lil function from the Library Functions Manual, section 3 (that's the C library girlies, iykyk). and what does it do? skip whitespace. that's it. that's the whole vibe. she skips, she's white, she's space. periodt. ✨


πŸ¦‹ SYNTAX πŸ¦‹

so first things first, you gotta bring her in:

#include <libowfat/scan.h>

size_t scan_whitenskip(const char *src,size_t limit);

two args, one size_t coming back at you, no cap. πŸ’…


🌸 DESCRIPTION 🌸

okay so here's the tea πŸ“ β€” scan_whitenskip returns the length of the maximum prefix of src that consists solely of whitespace characters as defined by isspace.

translation for the group chat: she looks at src from the very start, keeps walking while everything is whitespace, and when she finally hits a non-whitespace character she stops and tells you how many steps she took. maximum prefix energy. she does not skip past anything else, she does not get distracted, she's locked in. πŸ‘‘

and what counts as whitespace around here? normally, this is ' ', '\f', '\n', '\r', '\t', '\v'. that's space, form feed, newline, carriage return, tab, vertical tab. the whole lil crew. 🌈

and yeah, it's whatever your isspace says it is β€” the manpage says "as defined by isspace", so the locale gets a say. don't come for me, I'm just the messenger. πŸ™ˆ

⭐ SEE ALSO ⭐

  • scan_nonwhitenskip(3) β€” the opposite twin fr fr, she skips everything that isn't whitespace. they're giving complementary main character energy, obsessed. 🫢

okay that's the whole page, bestie πŸ’œ this was scan_whitenskip(3) from the Library Functions Manual, and the footer was literally just her name again β€” scan_whitenskip(3) β€” because she's iconic enough to need no date, no version, no nothing. just vibes. πŸ’…βœ¨πŸŽ€