Skip to content

List of methods for bool values variables

List of methods for bool. Consider name of variable is b and value is true for all examples.

ToString()

Returns the value of the variable in string. true if true and false if false. Example:

b.ToString().Value //returns "true"

Custom(t string, f string)

Returns the value of the variable in string but with custom string returned. t if true and f if false. Example:

b.Custom('TRUE','FALSE').Value //returns "TRUE"
b.Custom('1','0').Value //returns "1"
b.Custom('yes','no').Value //returns "yes"

Negate()

Returns a bool inverted. Example:

b.Negate().Value //returns false
b.Negate().Negate().Value //returns true