strnlen(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the Kernel API Manual entry for strnlen(9) πŸ’…βœ¨

strnlen β€” returns a bounded count of characters in a NUL-terminated string πŸŽ€


✨ SYNOPSIS ✨

__kernel_size_t strnlen (const char * const p , __kernel_size_t maxlen
);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • p β€” pointer to the NUL-terminated string you're counting, bestie 🫢
  • maxlen β€” the maximum number of characters to count, no cap πŸ“

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: it returns the number of characters in p β€” and NOT including the final NUL, okay? 😌 β€” or it returns maxlen if no NUL has been found up to there πŸ‘‘βœ¨

That's literally the whole thing. Iconic behavior, zero drama πŸ’…


🌈 SEE ALSO 🌈


mwah πŸ’‹ this page's source/version is ./include/linux, dated October 2026 β€” periodt, bestie πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from