Enumeration

Unicode.ASCII

No overview available.

Declaration

@frozen enum ASCII

Topics

Type Aliases

typealias Unicode.ASCII.CodeUnit

The basic unit of encoding

typealias Unicode.ASCII.EncodedScalar

A valid scalar value as represented in this encoding

typealias Unicode.ASCII.ForwardParser

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

typealias Unicode.ASCII.ReverseParser

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

Type Properties

static var encodedReplacementCharacter: Unicode.ASCII.EncodedScalar

A unicode scalar value to be used when repairing encoding/decoding errors, as represented in this encoding.

Type Methods

static func decode(Unicode.ASCII.EncodedScalar) -> Unicode.Scalar

Converts from encoded to encoding-independent representation

static func encode(Unicode.Scalar) -> Unicode.ASCII.EncodedScalar?

Converts from encoding-independent to encoded representation, returning nil if the scalar can’t be represented in this encoding.

static func isASCII(Unicode.ASCII.CodeUnit) -> Bool

Returns whether the given code unit represents an ASCII scalar

static func transcode<FromEncoding>(FromEncoding.EncodedScalar, from: FromEncoding.Type) -> Unicode.ASCII.EncodedScalar?

Converts a scalar from another encoding’s representation, returning nil if the scalar can’t be represented in this encoding.

static func transcode<FromEncoding>(FromEncoding.EncodedScalar, from: FromEncoding.Type) -> CollectionOfOne<Unicode.ASCII.CodeUnit>?

Converts a scalar from another encoding’s representation, returning nil if the scalar can’t be represented in this encoding.

See Also

Unicode Codecs

protocol UnicodeCodec

A Unicode encoding form that translates between Unicode scalar values and form-specific code units.

enum UnicodeDecodingResult

The result of one Unicode decoding step.

enum Unicode.ParseResult

The result of attempting to parse a T from some input.