You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to format 123.123 and 123.1234 to with "up to 4" digits after the comma.
But using the format #.#### would result in 123.1230 for the first case instead of 123.123
Could we have something like #,#### = fill trailing zeros and #,**** skip trailing zeros? That would be backwards compatible. Or is there any formatting guideline that you are following?
The text was updated successfully, but these errors were encountered:
As far as i know there is no direct way of doing this, what you can do is strings.TrimRight(strings.TrimRight(humanize.FormatFloat("", 123.1), "0"), ".")
I like to format
123.123
and123.1234
to with "up to 4" digits after the comma.But using the format
#.####
would result in123.1230
for the first case instead of123.123
Could we have something like
#,####
= fill trailing zeros and#,****
skip trailing zeros? That would be backwards compatible. Or is there any formatting guideline that you are following?The text was updated successfully, but these errors were encountered: