ufmt

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 9 Imported by: 7

Documentation

Index

Constants

View Source
const IntPrefix = "KMGTPE"

Variables

This section is empty.

Functions

func BitSize added in v0.1.1

func BitSize[V constraints.Integer](v V) string

func BitSizeDense added in v0.1.1

func BitSizeDense[V constraints.Integer](v V) string

func BitSizeExact added in v0.1.14

func BitSizeExact[V constraints.Integer](v V) string

func BitSpeed added in v0.1.1

func BitSpeed[V constraints.Integer](v V) string

func BitSpeedDense added in v0.1.1

func BitSpeedDense[V constraints.Integer](v V) string

func Bool

func Bool(v bool, yes, no string) string

func ByteSize added in v0.1.1

func ByteSize[V constraints.Integer](v V) string

func ByteSizeDense added in v0.1.1

func ByteSizeDense[V constraints.Integer](v V) string

func ByteSizeExact added in v0.1.14

func ByteSizeExact[V constraints.Integer](v V) string

func ByteSpeed added in v0.1.1

func ByteSpeed[V constraints.Integer](v V) string

func ByteSpeedDense added in v0.1.1

func ByteSpeedDense[V constraints.Integer](v V) string

func CheckBox added in v0.4.2

func CheckBox(v bool) string

func DelicateFloat64 added in v0.6.23

func DelicateFloat64(v float64, precision int) (s string)

func EnableDisable

func EnableDisable(v bool) string

func Float64 added in v0.3.25

func Float64(v float64, precision int) (s string)

func Hex

func Hex(buf []byte) string

func Int added in v0.1.1

func Int[V constraints.Integer](v V, ctx IntCtx) string

func Join

func Join(v ...any) string

func JoinSlice added in v0.1.7

func JoinSlice[T any](v []T) string

func JoinSliceWith added in v0.1.7

func JoinSliceWith[T any](splitter string, v []T) string

func JoinWith

func JoinWith(splitter string, v ...any) string

func NotableJoin added in v0.1.28

func NotableJoin(v ...any) string

func NotableJoinSlice added in v0.1.28

func NotableJoinSlice[T any](v []T) string

func NotableJoinSliceWith added in v0.1.28

func NotableJoinSliceWith[T any](splitter string, v []T) string

func NotableJoinWith added in v0.1.28

func NotableJoinWith(splitter string, v ...any) string

func OnOff

func OnOff(v bool) string

func OnlineOffline added in v0.1.71

func OnlineOffline(v bool) string

func Option added in v0.1.30

func Option[T any](ptr *T) string

func Print

func Print(v ...any)

func Printf

func Printf(format string, v ...any)

func SuccessFailure added in v0.1.26

func SuccessFailure(v bool) string

func UpDown added in v0.1.29

func UpDown(v bool) string

func Value added in v0.1.30

func Value(v any) string

func WideFloat added in v0.6.34

func WideFloat(v float64, precision int) string

func WideInt added in v0.1.1

func WideInt[V constraints.Integer](v V) string

func YesNo

func YesNo(v bool) string

Types

type IntCtx added in v0.1.1

type IntCtx struct {
	Base          any
	Precision     any
	FixFractional bool
	MinLevel      any
	MaxLevel      any
	Dense         bool
	Name          string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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