scan_nonwhitenskip(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_nonwhitenskip(3) ✨

okay bestie, buckle up, we're doing a lil library function today and honestly? she's a baddie. this one lives in the Library Functions Manual and her whole name is scan_nonwhitenskip πŸ’…


πŸŽ€ NAME πŸŽ€

scan_nonwhitenskip β€” skip non-whitespace πŸ’–

like, that's it. that's the job. she skips the stuff that isn't whitespace. iconic behaviour, no notes.


🌸 SYNTAX 🌸

#include <libowfat/scan.h>

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, fr fr: scan_nonwhitenskip returns the length of the maximum prefix of src that consists solely of non-whitespace characters, as defined by !isspace. 🫢

in normal-people terms? she walks along your string and counts how many characters in a row are not whitespace, then hands you that number back. that's the whole vibe. she does not care about anything past the first whitespace she trips over β€” she just stops, turns around, and goes "that's how far I got bestie" 😌

normally, "whitespace" here means everything except these lil guys:

  • ' '
  • '\f'
  • '\n'
  • '\r'
  • '\t'
  • '\v'

so it's literally every other character, periodt. 🌈

also important, don't skip this part: src is considered to end at \0 or after limit characters. so whichever comes first, that's the finish line. she will not run past either one, no cap. 🏁


πŸ’œ SEE ALSO πŸ’œ

(yeah she's referencing herself, main character energy only πŸ˜­πŸ‘‘)


and that's the whole page, babe ✨ this lil writeup came to you straight from the Library Functions Manual, starring scan_nonwhitenskip(3) herself β€” go forth and skip some non-whitespace, you absolute icon πŸ’–πŸ¦‹πŸŒΈπŸ’