View source

class thx.Bools

Available on all platforms

Class Fields

static function canParse(v:String):Bool

Returns true if the passed value is either true or false (case insensitive).

static function compare(a:Bool, b:Bool):Int

Returns a comparison value (Int) from two boolean values.

static inline function option<A>(cond:Bool, a:A):Option<A>

Depending upon the condition, return the provided value wrapped in a Some, or None if the condition is false.

static function parse(v:String):Bool

Returns true/false if the passed value is true/false (case insensitive); with any other value it will return null.

static function toInt(v:Bool):Int

Converts a boolean to an integer value (true => 1, false => 0).

static inline function xor(a:Bool, b:Bool):Bool

Returns true when arguments are different.

Toggle inherited fields