Documentation ¶
Overview ¶
Package num provides tools for adding thousands separators to numbers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFormat ¶
AppendFormat, adds thousands separators to byte slice b and appends the results to dst. If b is not a number it is not appended to dst.
func Format ¶
Format, adds thousands separators to string s. An error is returned is s is not a number.
func FormatUint ¶
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder is a stream formatter.
func NewEncoder ¶
NewEncoder, returns an Encoder that writes to w.
type Num ¶
type Num struct {
// contains filtered or unexported fields
}
func (*Num) Flush ¶
Flush, formats any partially read numbers and flushes them into the internal buffer.
func (*Num) Read ¶
Read, flushes any partial numbers and reads up to len(p) bytes from the internal buffer into p.
type ScannerError ¶
type ScannerError struct {
// contains filtered or unexported fields
}
func (ScannerError) Bytes ¶
func (s ScannerError) Bytes() int64
func (ScannerError) Error ¶
func (s ScannerError) Error() string
Click to show internal directories.
Click to hide internal directories.