currency

package
v0.8.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Power10

func Power10(m int) int

Power10 calculates 10 to the mth power.

Types

type FixedFormatter

type FixedFormatter struct {
	// contains filtered or unexported fields
}

FixedFormatter holds currency formatting configuration.

func NewFixedFormatter

func NewFixedFormatter(symbol string, precision, factor int, thousandSep, decimalSep, format string) FixedFormatter

NewFixedFormatter creates a new currency formatter with the specified configuration.

func (FixedFormatter) Format

func (cf FixedFormatter) Format(amount int64) string

Format formats a monetary amount based on fixed point integer of the currency.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL