boolKit

package
v3.0.922 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ToBool = cast.ToBool

	ToBoolE = cast.ToBoolE
)

Functions

func Bool added in v3.0.106

func Bool(v bool) *bool

func StringToBool

func StringToBool(str string) bool

StringToBool 类型转换: string => bool

PS: 参考了 strconv.ParseBool()、Java hutool中的BooleanUtil.toBoolean().

func ToBoolWithDefault

func ToBoolWithDefault(src interface{}, def bool) bool

func ToString

func ToString(b bool) string

ToString 类型转换: bool => string

e.g. (true) => "true" (false) => "false"

Types

This section is empty.

Jump to

Keyboard shortcuts

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