strspn(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, welcome to the strspn(9) page from the Kernel API Manual β€” yes that's the vibe, this is a kernel function, not your usual man page energy ✨

strspn β€” calculates the length of the initial substring of @s that only contains letters in @accept πŸŽ€

Like, it's literally measuring how far the matching streak goes from the very start of s before something outside the accept club shows up. iykyk πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

size_t strspn (const char *s , const char *accept );

no cap, that's the whole signature, keep it exactly like that πŸ™ˆ


🌸 ARGUMENTS 🌸

  • s β€” the string that's getting searched, your main character string honestly πŸ‘‘
  • accept β€” the string you're searching for, aka the little set of letters that's allowed in the initial run πŸ”₯

⭐ SEE ALSO ⭐

kernel file ./lib/string.c β€” that's where the source lives, bestie, go say hi 🫢

that's the whole friend group, absolutely iconic lineup πŸŒˆπŸ’œ


ngl, if you're looking for the actual behaviour details, this page is giving "short and sweet" β€” the facts above are all it's serving, so don't go inventing extra lore, bestie πŸ’€

and that's a wrap, mwah πŸ’…βœ¨ this little cutie is brought to you by ./lib, dated October 2026 β€” slay, go forth and count your substrings πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from