← All docs
str_contains() — internals
Compiler internals for str_contains(): lowering path, type checks, and runtime helpers.
str_contains() — internals
Where it lives
- Signature:
src/builtins/string/str_contains.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:744 (lower_str_contains) - Function symbol:
lower_str_contains()
Lowering notes
- Lowers
str_contains()throughstrpos()and converts found positions to bool.
Runtime helpers
The following runtime helpers are referenced:
__rt_strpos
Signature summary
function str_contains(string $haystack, string $needle): bool
What the type checker enforces
- Arity: takes exactly 2 arguments.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/str_contains.rs(eval_builtin!) - Dispatch hooks:
direct,values