convert

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Overview

Copyright (C) 2019 tisnyo <[email protected]>.

package convert helps you convert types to another type. license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToStr

func BoolToStr(value bool) string

BoolToStr converts bool to string.

func ByteToStr

func ByteToStr(value byte) string

ByteToStr converts byte to string.

func Bytes2Length

func Bytes2Length(ret []byte) int64

Bytes2Length converts a byte array to an int64 value.

func DecodeBase64

func DecodeBase64(input string) ([]byte, error)

DecodeBase64 decode a base64 string.

func EncodeBase64

func EncodeBase64(input string) string

EncodeBase64 converts an input string to base64 string.

func Float32ToStr

func Float32ToStr(value float32) string

Float32ToStr converts float32 to string.

func Float64ToStr

func Float64ToStr(value float64) string

Float64ToStr converts float64 to string.

func Int16ToStr

func Int16ToStr(value int16) string

Int16ToStr converts int32 to string.

func Int32ToStr

func Int32ToStr(value int32) string

Int32ToStr converts int32 to string.

func Int64ToStr

func Int64ToStr(value int64) string

Int64ToStr converts int64 to string.

func Int8ToStr

func Int8ToStr(value int8) string

Int8ToStr converts int32 to string.

func IntToStr

func IntToStr(value int) string

IntToStr converts int to string.

func Length2Bytes

func Length2Bytes(len int64, buffer []byte) []byte

Length2Bytes converts an int64 value to a byte array.

func StrToBool

func StrToBool(value string) (bool, error)

StrToBool converts string to bool.

func StrToByte

func StrToByte(value string) (byte, error)

StrToByte converts string to byte.

func StrToFloat32

func StrToFloat32(value string) (float32, error)

StrToFloat32 converts string to float32.

func StrToFloat64

func StrToFloat64(value string) (float64, error)

StrToFloat64 converts string to float64.

func StrToInt

func StrToInt(value string) (int, error)

StrToInt converts string to int.

func StrToInt16

func StrToInt16(value string) (int16, error)

StrToInt16 converts string to int16.

func StrToInt32

func StrToInt32(value string) (int32, error)

StrToInt32 converts string to int32.

func StrToInt64

func StrToInt64(value string) (int64, error)

StrToInt64 converts string to int64.

func StrToInt8

func StrToInt8(value string) (int8, error)

StrToInt8 converts string to int8.

func StrToUint

func StrToUint(value string) (uint, error)

StrToInt converts string to int.

func StrToUint16

func StrToUint16(value string) (uint16, error)

StrToUint16 converts string to int16.

func StrToUint32

func StrToUint32(value string) (uint32, error)

StrToUint32 converts string to uint32.

func StrToUint64

func StrToUint64(value string) (uint64, error)

StrToUint64 converts string to uint64.

func StrToUint8

func StrToUint8(value string) (uint8, error)

StrToUint8 converts string to uint8.

func Uint16ToStr

func Uint16ToStr(value uint16) string

Uint16ToStr converts int32 to string.

func Uint32ToStr

func Uint32ToStr(value uint32) string

Uint32ToStr converts int32 to string.

func Uint64ToStr

func Uint64ToStr(value uint64) string

Uint64ToStr converts uint64 to string.

func Uint8ToStr

func Uint8ToStr(value uint8) string

Uint8ToStr converts int32 to string.

func UintToStr

func UintToStr(value uint) string

UintToStr converts int to string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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