Enumeration

Unicode.UTF32

No overview available.

Declaration

@frozen enum UTF32

Topics

Type Aliases

typealias Unicode.UTF32.CodeUnit

The basic unit of encoding

typealias Unicode.UTF32.EncodedScalar

A valid scalar value as represented in this encoding

typealias Unicode.UTF32.ForwardParser

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

typealias Unicode.UTF32.ReverseParser

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

Initializers

init()

Creates an instance of the UTF-32 codec.

Instance Properties

var hashValue: Int

The hash value.

Type Properties

static var encodedReplacementCharacter: Unicode.UTF32.EncodedScalar

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

Instance Methods

func decode<I>(inout I) -> UnicodeDecodingResult

Starts or continues decoding a UTF-32 sequence.

func hash(into: inout Hasher)

Hashes the essential components of this value by feeding them into the given hasher.

Type Methods

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

Converts from encoded to encoding-independent representation

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

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

static func encode(Unicode.Scalar, into: (Unicode.UTF32.CodeUnit) -> Void)

Encodes a Unicode scalar as a UTF-32 code unit by calling the given closure.

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

Returns whether the given code unit represents an ASCII scalar

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

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

Operator Functions

static func != (Unicode.UTF32, Unicode.UTF32) -> Bool

Returns a Boolean value indicating whether two values are not equal.

static func == (Unicode.UTF32, Unicode.UTF32) -> Bool

Returns a Boolean value indicating whether two values are equal.

Relationships

Conforms To

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.