converter

package
v0.0.0-...-e3369bb Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToByteVector

func ToByteVector(value string) ([]byte, error)

ToByteVector converts the strring to an array of bytes. The string must be an even amount of hexadecimal characters. This is converted to a byte vector by stripping all whitespace and treating each pair of characters as a single byte hex number.

func ToExponent

func ToExponent(value string) (int32, error)

ToExponent converts the value specified to a normalized decimal (mantissa x10 ^ exponent) where the mantissa % 10 != 0. The function then returns the exponent part of the decimal only.

func ToInt32

func ToInt32(value string) (int32, error)

ToInt32 converts the string to an int32 type, returning an error if the conversion fails

func ToInt64

func ToInt64(value string) (int64, error)

ToInt64 converts the string to an int64 type, returning an error if the conversion fails

func ToMantissa

func ToMantissa(value string) (int64, error)

ToMantissa converts the value specified to a normalized decimal (mantissa x10 ^ exponent) where the mantissa % 10 != 0. The function then returns the mantissa part of the decimal only.

func ToString

func ToString(value string) (interface{}, error)

ToString passes back the value given to it

func ToUInt32

func ToUInt32(value string) (uint32, error)

ToUInt32 converts the string to an uint32 type, returning an error if the conversion fails

func ToUInt64

func ToUInt64(value string) (uint64, error)

ToUInt64 converts the string to an uint64 type, returning an error if the conversion fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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