Type Method


Returns a localized number string with the specified style.


class func localizedString(from num: NSNumber, number nstyle: NumberFormatter.Style) -> String



The number to localize


The localization style to use. See NumberFormatter.Style for the supported values.

Return Value

An appropriately formatted NSString.

See Also

Converting Between Numbers and Strings

func getObjectValue(AutoreleasingUnsafeMutablePointer<AnyObject?>?, for: String, range: UnsafeMutablePointer<NSRange>?)

Returns by reference a cell-content object after creating it from a range of characters in a given string.

func number(from: String) -> NSNumber?

Returns an NSNumber object created by parsing a given string.

func string(from: NSNumber) -> String?

Returns a string containing the formatted value of the provided number object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software