Returns the low-surrogate code unit of the surrogate pair representing the specified Unicode scalar.
- Xcode 9.0+
- Swift Standard Library
A Unicode scalar value.
xmust be represented by a surrogate pair when encoded in UTF-16. To check whether
xis represented by a surrogate pair, use
.width(x) == 2
The trailing surrogate code unit of
x when encoded in UTF-16.
Because a Unicode scalar value can require up to 21 bits to store its value, some Unicode scalars are represented in UTF-16 by a pair of 16-bit code units. The first and second code units of the pair, designated leading and trailing surrogates, make up a surrogate pair.