strutil

package
v0.0.0-...-29c100b Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolsToStrs

func BoolsToStrs(items []bool) []string

func Clamp

func Clamp(x, lo, hi float64) float64

func ClampInt

func ClampInt(x, lo, hi int) int

func Degrees

func Degrees(radians float64) float64

func DurationString

func DurationString(d time.Duration) string

func FirstIsLower

func FirstIsLower(s string) bool

func FirstIsUpper

func FirstIsUpper(s string) bool

func FirstToLower

func FirstToLower(s string) string

func FirstToUpper

func FirstToUpper(s string) string

func Float32sToStrs

func Float32sToStrs(items []float32) []string

func Float64sToStrs

func Float64sToStrs(items []float64) []string

func Fract

func Fract(x float64) float64

func Int16sToStrs

func Int16sToStrs(items []int16) []string

func Int32sToStrs

func Int32sToStrs(items []int32) []string

func Int64sToStrs

func Int64sToStrs(items []int64) []string

func Int8sToStrs

func Int8sToStrs(items []int8) []string

func IntsToStrs

func IntsToStrs(items []int) []string

func M2bool

func M2bool(i interface{}) bool

func M2float32

func M2float32(i interface{}) float32

func M2float64

func M2float64(i interface{}) float64

func M2int16

func M2int16(i interface{}) int16

func M2int32

func M2int32(i interface{}) int32

func M2int64

func M2int64(i interface{}) int64

func M2int8

func M2int8(i interface{}) int8

func M2string

func M2string(i interface{}) string

func Median

func Median(items []float64) float64

func ParseBools

func ParseBools(items []string) ([]bool, error)

忽略空字符串

func ParseFloat32s

func ParseFloat32s(items []string) ([]float32, error)

忽略空字符串

func ParseFloat64s

func ParseFloat64s(items []string) ([]float64, error)

忽略空字符串

func ParseInt16s

func ParseInt16s(items []string) ([]int16, error)

忽略空字符串

func ParseInt32s

func ParseInt32s(items []string) ([]int32, error)

忽略空字符串

func ParseInt64s

func ParseInt64s(items []string) ([]int64, error)

忽略空字符串

func ParseInt8s

func ParseInt8s(items []string) ([]int8, error)

忽略空字符串

func ParseInts

func ParseInts(items []string) ([]int, error)

忽略空字符串

func Radians

func Radians(degrees float64) float64

func ShowProgress

func ShowProgress(start time.Time, rays uint64, crtValue, totalValue int)

func StoBol

func StoBol(v string, def ...bool) bool

没找到并且没有默认值则 panic抛错

func Stof32

func Stof32(v string, def ...float32) float32

没找到并且没有默认值则 panic抛错

func Stof64

func Stof64(v string, def ...float64) float64

没找到并且没有默认值则 panic抛错

func Stoi

func Stoi(v string, def ...int) int

没找到并且没有默认值则 panic抛错

func Stoi16

func Stoi16(v string, def ...int16) int16

没找到并且没有默认值则 panic抛错

func Stoi32

func Stoi32(v string, def ...int32) int32

没找到并且没有默认值则 panic抛错

func Stoi64

func Stoi64(v string, def ...int64) int64

没找到并且没有默认值则 panic抛错

func Stoi8

func Stoi8(v string, def ...int8) int8

没找到并且没有默认值则 panic抛错

func Stou

func Stou(v string, def ...uint) uint

没找到并且没有默认值则 panic抛错

func Stou16

func Stou16(v string, def ...uint16) uint16

没找到并且没有默认值则 panic抛错

func Stou32

func Stou32(v string, def ...uint32) uint32

没找到并且没有默认值则 panic抛错

func Stou64

func Stou64(v string, def ...uint64) uint64

没找到并且没有默认值则 panic抛错

func Stou8

func Stou8(v string, def ...uint8) uint8

没找到并且没有默认值则 panic抛错

Types

This section is empty.

Jump to

Keyboard shortcuts

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