fn contains_whole_word(haystack: &str, needle: &str, allow_plural: bool) -> boolExpand description
Returns true if haystack contains needle as a whole word, or — when
allow_plural is true — as a whole word plus a simple trailing “s” (so
“tokens”/“secrets”/“credentials”/etc. match the same as their singular
form; see doc comment on SENSITIVE_WHOLE_WORD_KEYWORDS for why plurals
were previously missed, and why some keywords opt out).