Skip to content
FloatTryToScientificStr

FloatTryToScientificStr

Description

Render value as a scientific-notation string into *out (mantissa[.fraction]e[+-]exponent). uppercase chooses E vs e.

Parameters

Name Direction Description
out out Receives a freshly-initialised Str. Caller StrDeinits on either path.
value in Float to render.
precision in Number of digits after the leading mantissa digit, used only when has_precision is true.
has_precision in Whether precision should be applied.
uppercase in true -> E+NN, false -> e+NN.
alloc in Allocator backing *out.

Success

Returns true. *out carries the scientific rendering.

Failure

Returns false on allocator OOM. *out is left zeroed.

Usage example (Cross-references)

Usage examples (Cross-references)
No external code usages found in the scanned files.
Last updated on