← All docs
substr_replace() — internals
Compiler internals for substr_replace(): lowering path, type checks, and runtime helpers.
substr_replace() — internals
Where it lives
- Signature:
src/builtins/string/substr_replace.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:792 (lower_substr_replace) - Function symbol:
lower_substr_replace()
Lowering notes
- Lowers
substr_replace(string, replacement, start, length?).
Runtime helpers
The following runtime helpers are referenced:
__rt_str_repeat__rt_substr_replace
Signature summary
function substr_replace(string $string, string $replace, int $offset, int $length = null): string
What the type checker enforces
- Arity: takes 3–4 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/substr_replace.rs(eval_builtin!) - Dispatch hooks:
direct,values