Contents

scanInt(_:)

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

Declaration

func scanInt(_ result: UnsafeMutablePointer<Int>?) -> Bool

Parameters

  • result:

    Upon return, contains the scanned value. Contains INT_MAX or INT_MIN on overflow.

Return Value

true if the receiver finds a valid integer representation, otherwise false. Overflow is considered a valid integer representation.

Discussion

Skips past excess digits in the case of overflow, so the receiver’s position is past the entire integer representation.

Invoke this method with NULL as value to simply scan past a decimal integer representation.

See Also

Related Documentation

Scanning Numeric Values