struct
UnicodeScalar
Inheritance |
Comparable, CustomDebugStringConvertible, CustomStringConvertible, Equatable, Hashable, Streamable, UnicodeScalarLiteralConvertible, _Reflectable
View Protocol Hierarchy →
|
---|---|
Import |
|
Initializers
Creates an instance of the NUL scalar value.
Declaration
init
()
Create an instance with numeric value v
.
Requires: v
is a valid Unicode scalar value.
Declaration
init
(
_
v
:
UInt16
)
Create an instance with numeric value v
.
Requires: v
is a valid Unicode scalar value.
Declaration
init
(
_
v
:
UInt32
)
Declaration
init
(
_builtinUnicodeScalarLiteral
value
:
Builtin
.
Int32
)
Create an instance initialized to value
.
Declaration
init
(
unicodeScalarLiteral
value
:
UnicodeScalar
)
Instance Variables
A textual representation of self
, suitable for debugging.
Declaration
var
debugDescription
:
String
{
get
}
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
}
Instance Methods
Returns true if this is an ASCII character (code point 0 to 127 inclusive).
Declaration
func
isASCII
() -
>
Bool
Write a textual representation of self
into target
.
Declaration
func
writeTo
<
Target
:
OutputStreamType
>
(
inout
target
:
Target
)
A Unicode scalar value.