conv

package
v0.0.0-...-0394936 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanString

func CleanString(str string) string

func Elem

func Elem[T any](e *T) T

func Float64ToString

func Float64ToString(f float64) string

Returns float without trailing zeroes.

20.60 -> 20.6
221.00 -> 221

func GetKeyString

func GetKeyString(s string) string

map all to [a-z0-9-]

func KeyString

func KeyString(s string) string

func Ptr

func Ptr[T any](v T) *T

Ptr returns pointer to value

func String

func String[T ~string](key T) T

String converts all characters to lowercase and replaces all non-alphanumeric characters with an underscore it also removes all leading and trailing non-alphanumeric characters

func ToBool

func ToBool(s string) bool

func ToInt64

func ToInt64(s string) int64

func UnixTimeStamp

func UnixTimeStamp(t time.Time) int64

UnixTimeStamp ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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