Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Number ¶
Number returns a string representation of the given number in specified format.
Usage:
fmtx.Number(12345.456, 0, "$", "") // "$12,345"
func NumberP0 ¶
NumberP0 is a wrapper around FormatNumber with 0 precision and no prefix or suffix.
Usage:
fmtx.NumberP0(12345.456) // "12,345"
func NumberP1 ¶
NumberP1 is a wrapper around FormatNumber with 1 precision and no prefix or suffix.
Usage:
fmtx.NumberP1(12345.456) // "12,345.4"
func Numeral ¶
Numeral returns a shorten, string representation of the given number.
Usage:
fmtx.Numeral(12345.456, 0) // "12k"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.