Open ClassFoundation5.9.0
NumberFormatter
class NumberFormatter
Superclasses
Citizens in Foundation
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol NSCoding
The
NSCoding
protocol declares the two methods that a class must implement so that instances of that class can be encoded and decoded. This capability provides the basis for archiving (where objects and other structures are stored on disk) and distribution (where objects are copied to different address spaces).protocol NSCopying
The
NSCopying
protocol declares a method for providing functional copies of an object. The exact meaning of “copy” can vary from class to class, but a copy must be a functionally independent object with values identical to the original at the time the copy was made.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
Members
class func localizedString(from: NSNumber, number: NumberFormatter.Style
) -> String var allowsFloats: Bool
var alwaysShowsDecimalSeparator: Bool
var attributedStringForNil: NSAttributedString
var attributedStringForNotANumber: NSAttributedString
var attributedStringForZero: NSAttributedString
var currencyCode: String!
var currencyDecimalSeparator: String!
var currencyGroupingSeparator: String!
var currencySymbol: String!
var decimalSeparator: String!
var exponentSymbol: String!
var format: String
var formatWidth: Int
var formattingContext: Formatter.Context
var generatesDecimalNumbers: Bool
var groupingSeparator: String!
var groupingSize: Int
var hasThousandSeparators: Bool
var internationalCurrencySymbol: String!
var isLenient: Bool
var isPartialStringValidationEnabled: Bool
var locale: Locale!
var localizesFormat: Bool
var maximum: NSNumber?
var maximumFractionDigits: Int
var maximumIntegerDigits: Int
var maximumSignificantDigits: Int
var minimum: NSNumber?
var minimumFractionDigits: Int
var minimumIntegerDigits: Int
var minimumSignificantDigits: Int
var minusSign: String!
var multiplier: NSNumber?
var negativeFormat: String!
var negativeInfinitySymbol: String
var negativePrefix: String!
var negativeSuffix: String!
var nilSymbol: String
var notANumberSymbol: String!
var numberStyle: NumberFormatter.Style
var paddingCharacter: String!
var paddingPosition: NumberFormatter.PadPosition
var perMillSymbol: String!
var percentSymbol: String!
var plusSign: String!
var positiveFormat: String!
var positiveInfinitySymbol: String
var positivePrefix: String!
var positiveSuffix: String!
var roundingBehavior: NSDecimalNumberHandler
var roundingIncrement: NSNumber!
var roundingMode: NumberFormatter.RoundingMode
var secondaryGroupingSize: Int
var textAttributesForNegativeInfinity: [String : Any]?
var textAttributesForNegativeValues: [String : Any]?
var textAttributesForNil: [String : Any]?
var textAttributesForNotANumber: [String : Any]?
var textAttributesForPositiveInfinity: [String : Any]?
var textAttributesForPositiveValues: [String : Any]?
var textAttributesForZero: [String : Any]?
var thousandSeparator: String!
var usesGroupingSeparator: Bool
var usesSignificantDigits: Bool
var zeroSymbol: String?
func copy(with: NSZone?
) -> Any func number(from: String
) -> NSNumber? func string(for: Any
) -> String? func string(from: NSNumber
) -> String? enum PadPosition
enum RoundingMode
enum Style