enum Unicode.ASCII
Associated Types |
EncodedScalar = CollectionOfOne<Unicode.ASCII.CodeUnit>
A valid scalar value as represented in this encoding |
---|---|
Nested Types | Unicode.ASCII.Parser |
Import | import Swift |
Static Variables
A unicode scalar value to be used when repairing encoding/decoding errors, as represented in this encoding.
If the Unicode replacement character U+FFFD is representable in this
encoding, encodedReplacementCharacter
encodes that scalar value.
Declaration
static var encodedReplacementCharacter: Unicode.ASCII.EncodedScalar { get }
Static Methods
Converts from encoded to encoding-independent representation
Declaration
static func decode(_ source: Unicode.ASCII.EncodedScalar) -> Unicode.Scalar
Converts from encoding-independent to encoded representation, returning
nil
if the scalar can't be represented in this encoding.
Declaration
static func encode(_ source: Unicode.Scalar) -> Unicode.ASCII.EncodedScalar?
Converts a scalar from another encoding's representation, returning
nil
if the scalar can't be represented in this encoding.
A default implementation of this method will be provided automatically for any conforming type that does not implement one.
Declaration
static func transcode<FromEncoding>(_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type) -> Unicode.ASCII.EncodedScalar? where FromEncoding : _UnicodeEncoding
The basic unit of encoding