MCPcopy Create free account
hub / github.com/AI45Lab/Code / contains_any

Function contains_any

core/src/tools/selector.rs:146–148  ·  view source on GitHub ↗
(haystack: &str, needles: &[&str])

Source from the content-addressed store, hash-verified

144}
145
146fn contains_any(haystack: &str, needles: &[&str]) -> bool {
147 needles.iter().any(|needle| haystack.contains(needle))
148}
149
150fn prompt_mentions_tool(prompt_lower: &str, tool_name_lower: &str) -> bool {
151 prompt_lower.contains(tool_name_lower)

Callers 1

select_tools_for_promptFunction · 0.70

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected