gconv

package
v0.0.0-...-2bcc11b Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyToDecimal

func AnyToDecimal(val any) (*gnum.Decimal, error)

func AnyToString

func AnyToString(val any) (string, error)

TODO

func BytesToBinString

func BytesToBinString(b []byte, delimiter string) string

BytesToBinString convert bytes to binary string Used to verify Net Mask delimiter: separator between bytes. Sample: convert []byte{254, 255, 255, 0} to "11111110111111111111111100000000"

func BytesToDecString

func BytesToDecString(b []byte, delimiter string, makeUpZeroes int) string

BytesToDecString convert bytes to decimal string Used to format IP, Net Mask, MAC delimiter: separator between bytes. Sample: convert []byte{254, 255, 255, 0} to "254255255000"

func BytesToHexString

func BytesToHexString(b []byte, delimiter string, makeUpZeroes bool) string

BytesToHexString convert bytes to hex string Used to format IP, Net Mask, MAC delimiter: separator between bytes. Sample: convert []byte{254, 255, 255, 0} to "feffff00"

func NumToString

func NumToString(num any) string

func StringToAny

func StringToAny(s string, convSample any) (any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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