zbool

package
v0.0.0-...-aa698f8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToInt

func BoolToInt(b bool) int

func FromAny

func FromAny(a any) bool

func FromString

func FromString(str string, def bool) bool

func FromStringWithError

func FromStringWithError(str string) (bool, error)

func SetAny

func SetAny(toPtr any, from bool)

func StringFor

func StringFor(val bool, strue, sfalse string) string

func ToString

func ToString(b bool) string

Types

type BoolInd

type BoolInd int

BoolInd is a bool which also has an indeterminate, or unknown state

const (
	Unknown         = 0
	False   BoolInd = 1
	True    BoolInd = 2
)

func FromBool

func FromBool(b bool) BoolInd

func FromStringWithInd

func FromStringWithInd(str string, def BoolInd) BoolInd

func ToBoolInd

func ToBoolInd(b bool) BoolInd

func (BoolInd) Bool

func (b BoolInd) Bool() bool

func (*BoolInd) FromBool

func (bi *BoolInd) FromBool(b bool)

func (BoolInd) IsFalse

func (b BoolInd) IsFalse() bool

func (BoolInd) IsTrue

func (b BoolInd) IsTrue() bool

func (BoolInd) IsUnknown

func (b BoolInd) IsUnknown() bool

func (BoolInd) String

func (b BoolInd) String() string

Jump to

Keyboard shortcuts

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