NumberFormatter

class NumberFormatter : Formatter
  • Define an initialier for decoding NumberFormatter from a decoder.

    Note

    Class extensions cannot conform to the Decodable protocol b/c required initializers must be defined in the base implementation.

    Throws

    DecodingError

    Declaration

    Swift

    public convenience init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to use to decode this instance.

  • Encode the object to the given encoder.

    Throws

    EncodingError

    Declaration

    Swift

    open func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to use to encode this instance.