Instance Property


The integer value of the string.


var intValue: Int32 { get }


The integer value of the string, assuming a decimal representation and skipping whitespace at the beginning of the string. This property is INT_MAX or INT_MIN on overflow. This property is 0 if the string doesn’t begin with a valid decimal text representation of a number.

This property uses formatting information stored in the non-localized value; use an Scanner object for localized scanning of numeric values from a string.

Special Considerations

In macOS 10.5 and later, use integerValue instead.

See Also

Related Symbols

var integerValue: Int

The NSInteger value of the string.

var doubleValue: Double

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

var floatValue: Float

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

func scanInt32(UnsafeMutablePointer<Int32>?)

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