MCPcopy
hub / github.com/pquerna/ffjson / trim

Function trim

fflib/v1/decimal.go:71–78  ·  view source on GitHub ↗

trim trailing zeros from number. (They are meaningless; the decimal point is tracked independent of the number of digits.)

(a *decimal)

Source from the content-addressed store, hash-verified

69// (They are meaningless; the decimal point is tracked
70// independent of the number of digits.)
71func trim(a *decimal) {
72 for a.nd > 0 && a.d[a.nd-1] == '0' {
73 a.nd--
74 }
75 if a.nd == 0 {
76 a.dp = 0
77 }
78}
79
80// Assign v to a.
81func (a *decimal) Assign(v uint64) {

Callers 4

AssignMethod · 0.70
rightShiftFunction · 0.70
leftShiftFunction · 0.70
RoundDownMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…