CFNumberFormatterCreateNumberFromString(_:_:_:_:_:)
Returns a number object representing a given string.
Declaration
func CFNumberFormatterCreateNumberFromString(_ allocator: CFAllocator!, _ formatter: CFNumberFormatter!, _ string: CFString!, _ rangep: UnsafeMutablePointer<CFRange>!, _ options: CFOptionFlags) -> CFNumber!Parameters
- allocator:
The allocator to use to allocate memory for the new object. Pass
NULLor Kcfallocatordefault to use the current default allocator. - formatter:
The number formatter to use.
- string:
The string to parse.
- rangep:
A reference to a range that specifies the substring of
stringto be parsed. IfNULL, the whole string is parsed. On return, contains the range of the actual extent of the parse (may be less than the given range). - options:
Specifies various configuration options to change the behavior of the parse. Currently, Parseintegersonly is the only possible value for this parameter.
Return Value
A new number that represents the given string. Returns NULL if there was a problem creating the number. Ownership follows the The Create Rule.