mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
tpl/lang: document delimiter option for FormatNumberCustom
Closes gohugoio/hugoDocs#1760
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
86b2a27438
commit
1155bbca9d
@@ -133,10 +133,10 @@ func (ns *Namespace) castPrecisionNumber(precision, number any) (uint64, float64
|
||||
return p, n, nil
|
||||
}
|
||||
|
||||
// FormatNumberCustom formats a number with the given precision using the
|
||||
// negative, decimal, and grouping options. The `options`
|
||||
// parameter is a string consisting of `<negative> <decimal> <grouping>`. The
|
||||
// default `options` value is `- . ,`.
|
||||
// FormatNumberCustom formats a number with the given precision. The first
|
||||
// options parameter is a space-delimited string of characters to represent
|
||||
// negativity, the decimal point, and grouping. The default value is `- . ,`.
|
||||
// The second options parameter defines an alternate delimiting character.
|
||||
//
|
||||
// Note that numbers are rounded up at 5 or greater.
|
||||
// So, with precision set to 0, 1.5 becomes `2`, and 1.4 becomes `1`.
|
||||
|
Reference in New Issue
Block a user