Contents

CFNumberFormatterGetValueFromString(_:_:_:_:_:)

Returns a number or value representing a given string.

Declaration

func CFNumberFormatterGetValueFromString(_ formatter: CFNumberFormatter!, _ string: CFString!, _ rangep: UnsafeMutablePointer<CFRange>!, _ numberType: CFNumberType, _ valuePtr: UnsafeMutableRawPointer!) -> Bool

Parameters

  • formatter:

    The number formatter to use.

  • string:

    The string to parse.

  • rangep:

    A reference to a range that specifies the substring of string to be parsed. If NULL, the whole string is parsed. Upon return, contains the range of the actual extent of the parse (may be less than the given range).

  • numberType:

    The type of value that valuePtr references. Valid values are listed in Cfnumbertype.

  • valuePtr:

    Upon return, contains a number or value representing the string in the specified format. You are responsible for releasing this value.

Return Value

true if the string was parsed successfully, otherwise false.

See Also

Formatting Values