← All docs
number_format() — internals
Compiler internals for number_format(): lowering path, type checks, and runtime helpers.
number_format() — internals
Where it lives
- Signature:
src/builtins/string/number_format.rs - Lowering:
src/codegen/lower_inst/builtins/strings.rs:937 (lower_number_format) - Function symbol:
lower_number_format()
Lowering notes
- Lowers
number_format()by arranging its runtime helper arguments.
Runtime helpers
The following runtime helpers are referenced:
__rt_number_format
Signature summary
function number_format(float $num, int $decimals = 0, string $decimal_separator = '.', string $thousands_separator = ','): string
What the type checker enforces
- Arity: takes 1–4 arguments (3 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/formatting/number_format.rs(eval_builtin!) - Dispatch hooks:
direct,values