1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-06 13:42:28 +08:00

doc: update doc for Comma

This commit is contained in:
dudaodong
2022-12-10 21:03:16 +08:00
parent 1533d00891
commit e435fa271b
2 changed files with 4 additions and 5 deletions

View File

@@ -28,13 +28,12 @@ import (
### <span id="Comma">Comma</span>
<p>Add comma to number by every 3 numbers from right. ahead by symbol char.
Param should be number or numberic string.</p>
<p>Add comma to a number value by every 3 numbers from right to left. ahead by symbol char. if value is a invalid number string like "aa", return empty string.</p>
<b>Signature:</b>
```go
func Comma(v any, symbol string) string
func Comma[T constraints.Float | constraints.Integer | string](value T, symbol string) string
```
<b>Example:</b>

View File

@@ -28,12 +28,12 @@ import (
### <span id="Comma">Comma</span>
<p>用逗号每隔3位分割数字/字符串,签名添加符号。参数必须是数字或者可以转为数字的字符串</p>
<p>用逗号每隔3位分割数字/字符串,支持前缀添加符号。参数value必须是数字或者可以转为数字的字符串, 否则返回空字符串</p>
<b>函数签名:</b>
```go
func Comma(v any, symbol string) string
func Comma[T constraints.Float | constraints.Integer | string](value T, symbol string) string
```
<b>例子:</b>