humanize

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Humanize

type Humanize struct{}

Humanize is a collection of humanize github.com/dustin/go-humanize functions.

func (Humanize) BigBytes

func (Humanize) BigBytes(s *big.Int) string

func (Humanize) BigComma

func (Humanize) BigComma(b *big.Int) string

func (Humanize) BigCommaf

func (Humanize) BigCommaf(v *big.Float) string

func (Humanize) BigIBytes

func (Humanize) BigIBytes(s *big.Int) string

func (Humanize) Bytes

func (Humanize) Bytes(v uint64) string

func (Humanize) Comma

func (Humanize) Comma(v int64) string

func (Humanize) Commaf

func (Humanize) Commaf(v float64) string

func (Humanize) CommafWithDigits

func (Humanize) CommafWithDigits(f float64, decimals int) string

func (Humanize) ComputeSI

func (Humanize) ComputeSI(input float64) (float64, string)

func (Humanize) CustomRelTime

func (Humanize) CustomRelTime(a time.Time, b time.Time, albl string, blbl string, magnitudes []humanize.RelTimeMagnitude) string

func (Humanize) FormatFloat

func (Humanize) FormatFloat(format string, n float64) string

func (Humanize) FormatInteger

func (Humanize) FormatInteger(format string, n int) string

func (Humanize) Ftoa

func (Humanize) Ftoa(num float64) string

func (Humanize) FtoaWithDigits

func (Humanize) FtoaWithDigits(num float64, digits int) string

func (Humanize) IBytes

func (Humanize) IBytes(v uint64) string

func (Humanize) Ordinal

func (Humanize) Ordinal(x int) string

func (Humanize) ParseBigBytes

func (Humanize) ParseBigBytes(s string) (*big.Int, error)

func (Humanize) ParseBytes

func (Humanize) ParseBytes(s string) (uint64, error)

func (Humanize) RelTime

func (Humanize) RelTime(a time.Time, b time.Time, albl string, blbl string) string

func (Humanize) SI

func (Humanize) SI(input float64, unit string) string

func (Humanize) Time

func (Humanize) Time(then time.Time) string

Jump to

Keyboard shortcuts

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