init(_:)
Creates a Unicode scalar with the specified numeric value.
Declaration
init(_ v: UInt8)Parameters
- v:
The code point to use for the scalar.
Discussion
For example, the following code sample creates a Unicode.Scalar instance with a value of "7":
let codepoint: UInt8 = 55
let seven = Unicode.Scalar(codepoint)
print(seven)
// Prints "7"