Bool

struct Bool
  • SwifterSwift: Return inversed value of bool.

       false.toggled -> true
       true.toggled -> false
    

    Declaration

    Swift

    public var toggled: Bool
  • Undocumented

    Declaration

    Swift

    public mutating func toggle() -> Bool
  • int

    SwifterSwift: Return 1 if true, or 0 if false.

    false.int -> 0
    true.int -> 1
    

    Declaration

    Swift

    public var int: Int
  • SwifterSwift: Return true if true, or false if false.

    false.string -> "false"
    true.string -> "true"
    

    Declaration

    Swift

    public var string: String
  • SwifterSwift: Returns a random boolean value.

    Bool.random -> true
    Bool.random -> false
    

    Declaration

    Swift

    public static var random: Bool