convert

package
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Size = binary.Size

Size returns how many bytes Write would generate to encode the value v, which must be a fixed-size value or a slice of fixed-size values, or a pointer to such data. If v is neither of these, Size returns -1.

Functions

func CastFloat64

func CastFloat64[T Real](n T) float64

CastFloat64 recasts a Real number to float64. This may not have the effect you intend ...

func CastReal

func CastReal[N1, N2 Real](n N1) N2

CastReal recasts a variable of any type in the constraint Real to a specific instantiated type of Real. This may not have the effect you intend ...

func ToByte

func ToByte[N Real](n N) byte

ToByte recasts a variable of any type in the constraint Real to byte. This may not have the effect you intend ...

func ToString

func ToString[S Stringable](s S) string

func UnsafeBytesToString

func UnsafeBytesToString(bytes []byte) string

func UnsafeStringToBytes

func UnsafeStringToBytes(s string) []byte

Types

type Number

type Number constraints.Number

Number is a constraint that permits any real or complex number type.

type Ordered

type Ordered constraints.Ordered

Ordered is a constraint that permits any ordered type: any type that supports the operators < <= >= >.

type Real

type Real constraints.Real

Real is a constraint that permits any real number type.

type RealSet

type RealSet[T Real, S ~[]T] interface {
	List() S
}

type Realer

type Realer[T Real] interface {
	*T
	fmt.Stringer
}

type SliceHeader

type SliceHeader struct {
	Data uintptr
	Len  int
	Cap  int
}

type StringHeader

type StringHeader struct {
	Data uintptr
	Len  int
}

type Stringable

type Stringable any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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