Skip to content

feat: add FormatFloatNoTrailingZero to omit unneeded trailing decimal zeros - #170

Open
AdamMagued wants to merge 1 commit into
dustin:masterfrom
AdamMagued:fix-formatfloat-no-trailing-zero
Open

AdamMagued wants to merge 1 commit into
dustin:masterfrom
AdamMagued:fix-formatfloat-no-trailing-zero

Conversation

@AdamMagued

Copy link
Copy Markdown

Add FormatFloatNoTrailingZero and FormatIntegerNoTrailingZero to format numbers without superfluous trailing zeros in fractional output.

When callers specify precision formats, trailing zeros are trimmed from the fractional part while keeping any significant fractional digits intact. Whole numbers with all trailing fractional zeros omit the decimal separator.

Fixes #79

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] FormatFloatNoTrailingZero

1 participant