strspn(9)
π 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 π«Ά
strncasecmp(9)stpcpy(9)strcmp(9)strncmp(9)strchr(9)strchrnul(9)strnchrnul(9)strrchr(9)strnchr(9)strcspn(9)strpbrk(9)strsep(9)memset(9)memset16(9)memset32(9)memset64(9)memcpy(9)memmove(9)memcmp(9)bcmp(9)memscan(9)strstr(9)strnstr(9)memchr(9)memchr_inv(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms