numberformat

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package numberformat shows numbers by a language's separators: the decimal one and the one between thousands, each a translation of its own (message contexts ContextDecimal, ContextThousands: "." and "," in English).

Index

Constants

View Source
const (
	ContextDecimal   = "Decimal separator"
	ContextThousands = "Thousands separator"
)

Message contexts of the separators.

Variables

This section is empty.

Functions

func Format

func Format(v float64, decimals int, lang string) string

Format - v in lang with decimals digits after the separator (-1 - as many as it has): "12 500", "4,7" in Russian.

Types

This section is empty.

Jump to

Keyboard shortcuts

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