MCPcopy
hub / github.com/shopspring/decimal / String

Method String

decimal.go:1471–1473  ·  view source on GitHub ↗

String returns the string representation of the decimal with the fixed point. Example: d := New(-12345, -3) println(d.String()) Output: -12.345

()

Source from the content-addressed store, hash-verified

1469//
1470// -12.345
1471func (d Decimal) String() string {
1472 return d.string(true)
1473}
1474
1475// StringFixed returns a rounded fixed-point string with places digits after
1476// the decimal point.

Callers 15

TestNewFromFloatFunction · 0.95
BigFloatMethod · 0.95
MarshalJSONMethod · 0.95
ValueMethod · 0.95
MarshalTextMethod · 0.95
TestNewFromFloatRandomFunction · 0.45
TestNewFromFloat32RandomFunction · 0.45
TestNewFromStringFunction · 0.45
TestRequireFromStringFunction · 0.45
TestNewFromIntFunction · 0.45
TestNewFromInt32Function · 0.45

Calls 1

stringMethod · 0.95

Tested by 15

TestNewFromFloatFunction · 0.76
TestNewFromFloatRandomFunction · 0.36
TestNewFromFloat32RandomFunction · 0.36
TestNewFromStringFunction · 0.36
TestRequireFromStringFunction · 0.36
TestNewFromIntFunction · 0.36
TestNewFromInt32Function · 0.36
TestNewFromUint64Function · 0.36
TestNewFromBigRatFunction · 0.36
TestJSONFunction · 0.36