Skip to content
FloatTryToDecimalStr

FloatTryToDecimalStr

Description

Render value as a decimal-notation string into *out. When has_precision is true, precision decimal digits are emitted (padded with trailing zeros when needed); otherwise the canonical form of the float is used (no truncation, no padding).

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 fractional digits, used only when has_precision is true.
has_precision in Whether precision should be applied.
alloc in Allocator backing *out.

Success

Returns true. *out carries the decimal 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