memchr_inv(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 memchr_inv β€” Kernel API Manual 🌸

okay bestie, welcome to the memchr_inv(9) page πŸ’… this is the kernel API manual vibe, and we're about to find the one character that is not like the others. periodt.

✨ NAME ✨

memchr_inv β€” find an unmatching character in an area of memory. lowkey iconic.

πŸ¦‹ SYNOPSIS πŸ¦‹

void * memchr_inv (const void *start , int c , size_t bytes );

πŸŽ€ ARGUMENTS πŸŽ€

  • start β€” the memory area. like, the buffer we're checking out πŸ‘€
  • c β€” find a character other than c. yep, we're looking for the odd one out πŸ’…
  • bytes β€” the size of the area. how many bytes we get to search, no cap.

πŸ”₯ DESCRIPTION πŸ”₯

returns the address of the first character other than c, or NULL if the whole buffer contains just c. that's the whole plot twist 😭

🌈 SEE ALSO 🌈

Kernel file ./tools/lib/string.c β€” and the whole squad: memdup(9), strtobool(9), strlcpy(9), skip_spaces(9), strim(9), strreplace(9). iykyk πŸ’–


okay that's the whole page, bestie! 🫢 source/version info: ./tools/lib Β· date: October 2026 Β· page: memchr_inv(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from