UnicodeScalar

Inheritance Comparable, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, Streamable, UnicodeScalarLiteralConvertible, _Reflectable View Protocol Hierarchy →
Import
  • import Swift

Initializers

init()

Creates an instance of the NUL scalar value.

Declaration

  • init()
init(_: Int)

Construct with value v.

Requires: v is a valid unicode scalar value.

Declaration

init(_: UInt8)

Create an instance with numeric value v.

Declaration

init(_: UInt16)

Create an instance with numeric value v.

Requires: v is a valid Unicode scalar value.

Declaration

init(_: UInt32)

Create an instance with numeric value v.

Requires: v is a valid Unicode scalar value.

Declaration

init(_: UnicodeScalar)

Create a duplicate of v.

Declaration

init(_builtinUnicodeScalarLiteral:)

Declaration

  • init(_builtinUnicodeScalarLiteral value: Builtin.Int32)
init(unicodeScalarLiteral:)

Create an instance initialized to value.

Declaration

Instance Variables

var debugDescription: String

A textual representation of self, suitable for debugging.

Declaration

  • var debugDescription: String { get }
var description: String

A textual representation of self.

Declaration

  • var description: String { get }
var hashValue: Int

The hash value.

Axiom: x == y implies x.hashValue == y.hashValue.

Note: The hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs.

Declaration

  • var hashValue: Int { get }
var value: UInt32

A numeric representation of self.

Declaration

Instance Methods

func escape(asASCII:)

Return a String representation of self .

forceASCII: If true, forces most values into a numeric representation.

Declaration

func isASCII()

Returns true if this is an ASCII character (code point 0 to 127 inclusive).

Declaration

  • func isASCII() -> Bool
func writeTo(inout:)

Write a textual representation of self into target.

Declaration