textsearch_find(9)
β¨ 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 behavestateβ 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 π
- Kernel file
./include/linux/textsearch.hβ the header where it all lives β¨ struct ts_state(9)struct ts_ops(9)struct ts_config(9)textsearch_next(9)textsearch_get_pattern(9)textsearch_get_pattern_len(9)
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
- 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