← All docs
wordwrap() — internals
Compiler internals for wordwrap(): lowering path, type checks, and runtime helpers.
wordwrap() — internals
Where it lives
- Signature:
src/builtins/string/wordwrap.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:864 (lower_wordwrap) - Function symbol:
lower_wordwrap()
Lowering notes
- Lowers
wordwrap(string, width?, break?, cut?)through the shared runtime helper.
Runtime helpers
The following runtime helpers are referenced:
__rt_str_pad__rt_wordwrap
Signature summary
function wordwrap(string $string, int $width = 75, string $break = '\n', bool $cut_long_words = false): string
What the type checker enforces
- Arity: takes 1–4 arguments (3 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/string/wordwrap.rs(eval_builtin!) - Dispatch hooks:
direct,values