← All docs
strrpos() — internals
Compiler internals for strrpos(): lowering path, type checks, and runtime helpers.
strrpos() — internals
Where it lives
- Signature:
src/builtins/string/strrpos.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:762 (lower_string_position) - Function symbol:
lower_string_position()
Lowering notes
- Lowers
strpos()/strrpos()and boxes position-or-false results as Mixed.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function strrpos(string $haystack, string $needle, int $offset = 0): mixed
What the type checker enforces
- Arity: takes 2–3 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/strrpos.rs(eval_builtin!) - Dispatch hooks:
direct,values