textsearch_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ textsearch_find(9) ✨

okay so we're in the Kernel API Manual bestie, and this page is textsearch_find(9) β€” yes it's a whole manual page just for one function, and honestly? iconic of it. it's giving "tiny function, big main character energy" πŸ’…


🌸 NAME 🌸

textsearch_find β€” start searching for a pattern πŸ”

like, literally the beginning of the hunt. the vibe check before the actual find.


πŸŽ€ SYNOPSIS πŸŽ€

unsigned int textsearch_find (struct ts_config *conf , struct ts_state
*state );

that's the whole signature, no cap. she takes two pointers and hands you back an unsigned int 🫢


πŸ’– ARGUMENTS πŸ’–

  • conf β€” the search configuration 🧚 like, all the settings telling the search how to behave
  • state β€” the search state πŸ’« the lil tracker that remembers where you're at

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜•: this function returns the position of first occurrence of the pattern, or UINT_MAX if no match was found.

that's it. that's the whole deal. either you get a position, or you get UINT_MAX and you're like 😭 no match bestie. literally the entire plot.

🌈 remember: UINT_MAX is the "nope, nothing, absolutely zero matches" answer β€” don't go treating it like a real position, ok? πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, fr fr, they're all lowkey connected πŸ”—


and that's the page!! πŸ¦‹ huge shoutout to ./include/linux for being the source, to October 2026 for the date, and to textsearch_find(9) itself for showing up and doing the absolute most with the absolute least πŸ’œ mwah, slay, periodt πŸŽ€

πŸ“¦ where this page comes from