Unicode.ASCII

enum Unicode.ASCII
Associated Types
CodeUnit = UInt8

The basic unit of encoding

EncodedScalar = CollectionOfOne<Unicode.ASCII.CodeUnit>

A valid scalar value as represented in this encoding

ForwardParser = Unicode.ASCII.Parser

A type that can be used to parse CodeUnits into EncodedScalars.

ReverseParser = Unicode.ASCII.Parser

A type that can be used to parse a reversed sequence of CodeUnits into EncodedScalars.

Nested Types Unicode.ASCII.Parser
Import import Swift

Static Variables

static var encodedReplacementCharacter: Unicode.ASCII.EncodedScalar

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

static func decode(_:)

Converts from encoded to encoding-independent representation

Declaration

static func decode(_ source: Unicode.ASCII.EncodedScalar) -> Unicode.Scalar
static func encode(_:)

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?
static func transcode(_:from:)

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