str

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S

type S string

S 字符串类型转换

func NewWithByte

func NewWithByte(b []byte) S

func (S) Bool

func (a S) Bool() (bool, error)

Bool 转换为bool

func (S) Bytes

func (a S) Bytes() []byte

Bytes 转换为[]byte

func (S) DefaultBool

func (a S) DefaultBool(defaultVal bool) bool

DefaultBool 转换为bool,如果出现错误则使用默认值

func (S) DefaultFloat32

func (a S) DefaultFloat32(defaultVal float32) float32

DefaultFloat32 转换为float32,如果出现错误则使用默认值

func (S) DefaultFloat64

func (a S) DefaultFloat64(defaultVal float64) float64

DefaultFloat64 转换为float64,如果出现错误则使用默认值

func (S) DefaultInt

func (a S) DefaultInt(defaultVal int) int

DefaultInt 转换为int,如果出现错误则使用默认值

func (S) DefaultInt64

func (a S) DefaultInt64(defaultVal int64) int64

DefaultInt64 转换为int64,如果出现错误则使用默认值

func (S) DefaultUint

func (a S) DefaultUint(defaultVal uint) uint

DefaultUint 转换为uint,如果出现错误则使用默认值

func (S) DefaultUint64

func (a S) DefaultUint64(defaultVal uint64) uint64

DefaultUint64 转换为uint64,如果出现错误则使用默认值

func (S) Float32

func (a S) Float32() (float32, error)

Float32 转换为float32

func (S) Float64

func (a S) Float64() (float64, error)

Float64 转换为float64

func (S) Int

func (a S) Int() (int, error)

Int 转换为int

func (S) Int64

func (a S) Int64() (int64, error)

Int64 转换为int64

func (S) String

func (a S) String() string

func (S) ToJSON

func (a S) ToJSON(v interface{}) error

ToJSON 转换为JSON

func (S) Uint

func (a S) Uint() (uint, error)

Uint 转换为uint

func (S) Uint64

func (a S) Uint64() (uint64, error)

Uint64 转换为uint64

Jump to

Keyboard shortcuts

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