convert

package
v0.0.0-...-9a46783 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToStr

func BoolToStr(v bool) string

BoolToStr ..

func DateTimeToStr

func DateTimeToStr(v time.Time) string

DateTimeToStr 格式2006.01.02 15:04

func DateTimeWithSecToStr

func DateTimeWithSecToStr(v time.Time) string

DateTimeWithSecToStr 格式2006.01.02 15:04:05

func DateToStr

func DateToStr(v time.Time) string

DateToStr 格式2006-01-02

func Float32ToStr

func Float32ToStr(v float32, prec int, withLastZeroFlag bool) string

Float32ToStr ..

func Float64ToStr

func Float64ToStr(v float64, prec int, withLastZeroFlag bool) string

Float64ToStr ..

func IntToStr

func IntToStr(v int) string

IntToStr ..

func StrToBool

func StrToBool(str string) bool

StrToBool 失败抛出异常

func StrToBool2

func StrToBool2(str string, defaultValue bool) bool

StrToBool2 失败返回默认值

func StrToDate

func StrToDate(str string) time.Time

StrToDate 字符串转换为日期(去除时间部分,使用Local) 转换错误抛出异常

func StrToDateTime

func StrToDateTime(str string) time.Time

StrToDateTime 字符串转换为日期(不去除时间部分,使用Local) 转换错误抛出异常

func StrToDateTime2

func StrToDateTime2(str string, defaultValue time.Time) time.Time

StrToDateTime2 字符串转换为日期(不去除时间部分,使用Local) 转换错误返回默认值

func StrToFloat

func StrToFloat(str string) float64

StrToFloat 失败抛出异常

func StrToFloat2

func StrToFloat2(str string, defaultValue float64) float64

StrToFloat2 失败返回默认值

func StrToInt

func StrToInt(str string) int

StrToInt 失败抛出异常

func StrToInt2

func StrToInt2(str string, defaultValue int) int

StrToInt2 失败返回默认值

Types

This section is empty.

Jump to

Keyboard shortcuts

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