Instance Property

boolValue

The Boolean value of the string.

Declaration

@property(readonly) BOOL boolValue;

Discussion

This property is YES on encountering one of "Y", "y", "T", "t", or a digit 1-9—the method ignores any trailing characters. This property is NO 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

Getting Numeric Values

doubleValue

The floating-point value of the string as a double.

floatValue

The floating-point value of the string as a float.

intValue

The integer value of the string.

integerValue

The NSInteger value of the string.

longLongValue

The long long value of the string.