-
Notifications
You must be signed in to change notification settings - Fork 648
Open
Description
It would be nice if Decimal
types implemented the fmt.Formatter
interface to allow the use of standard fmt
verbs/flags when formatting decimals to strings.
For example:
fmt.Printf("%.2f", decimal.RequireFromString("3.14"))
Would be equivalent to:
fmt.Printf("%s", decimal.RequireFromString("3.14").StringFixed(2))
There are a number of other verbs/flags that could be implemented which can be seen here
Jibaru
Metadata
Metadata
Assignees
Labels
No labels