Instance Property

boolValue

The Boolean value of the string.

Declaration

var boolValue: Bool { get }

Discussion

This property is true on encountering one of "Y", "y", "T", "t", or a digit 1-9—the method ignores any trailing characters. This property is false if the receiver doesn’t begin with a valid decimal text representation of a number.

The property assumes a decimal representation and skips whitespace at the beginning of the string. It also skips initial whitespace characters, or optional -/+ sign followed by zeroes.

See Also

Related Symbols

var integerValue: Int

The NSInteger value of the string.

func scanInt32(UnsafeMutablePointer<Int32>?)

Scans for an int value from a decimal representation, returning a found value by reference.