# Formatter formatter contains some functions for data formatting.
## Source: [https://github.com/duke-git/lancet/blob/v1/formatter/formatter.go](https://github.com/duke-git/lancet/blob/v1/formatter/formatter.go) ## Usage: ```go import ( "github.com/duke-git/lancet/formatter" ) ``` ## Index - [Comma](#Comma) ## Documentation ### CommaAdd comma to number by every 3 numbers from right. ahead by symbol char. Param should be number or numberic string.
Signature: ```go func Comma(v interface{}, symbol string) string ``` Example: ```go package main import ( "fmt" "github.com/duke-git/lancet/formatter" ) func main() { fmt.Println(formatter.Comma("12345", "")) // "12,345" fmt.Println(formatter.Comma(12345.67, "¥")) // "¥12,345.67" } ```