memchr(9)
π memchr(9) β Kernel API Manual π
okay bestie, welcome to the memchr(9) page β yes, the manual name is literally memchr(9), and this is the Kernel API Manual section. Letβs get into it π«Άβ¨
β¨ NAME β¨
memchr β find a character in an area of memory π
π SYNOPSIS π
void * memchr (const void *s , int c , size_t n );
πΈ ARGUMENTS πΈ
sβ the memory area π§cβ the byte to search for πnβ the size of the area π
π¦ DESCRIPTION π¦
okay so hereβs the tea β: it returns the address of the first occurrence of c, or NULL if c is not found. thatβs it, thatβs the vibe β no cap πβ¨
π SEE ALSO π
Kernel file ./lib/string.c β and the whole iconic friend group π:
strncasecmp(9)stpcpy(9)strcmp(9)strncmp(9)strchr(9)strchrnul(9)strnchrnul(9)strrchr(9)strnchr(9)strspn(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_inv(9)
made with π from source/version ./lib, dated October 2026, and the memchr(9) manual β bye bestie, slay your memory searches π«Άβ¨π
π¦ 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