utilsconv

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString converts byte slice to string without a memory allocation.

func ParseUint64

func ParseUint64(val string) (uint64, error)

func Str2Uint32

func Str2Uint32(val string, default_ uint32) uint32

func Str2Uint64

func Str2Uint64(val string, default_ uint64) uint64

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice without a memory allocation.

func ToSnakeCase

func ToSnakeCase(input string) string

ToSnakeCase converts the provided string to snake_case. Based on https://gist.github.com/stoewer/fbe273b711e6a06315d19552dd4d33e6

Types

type Map

type Map struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap(values ...string) Map

func (*Map) Add

func (m *Map) Add(value string)

func (*Map) Adds

func (m *Map) Adds(values ...string)

func (*Map) Exists

func (m *Map) Exists(value string) bool

Jump to

Keyboard shortcuts

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