Documentation
¶
Overview ¶
Package formatter implements some functions to format string, struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comma ¶
func Comma[T constraints.Float | constraints.Integer | string](value T, symbol string) string
Comma add comma to a number value by every 3 numbers from right. ahead by symbol char. if value is invalid number string eg "aa", return empty string Comma("12345", "$") => "$12,345", Comma(12345, "$") => "$12,345"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.