Source/Packages

Data.UTF8

packages/foundation/standard/src/Data/UTF8.alpha

1,298 lines193 declarations53.6 KiBSHA-256 4bef3dfd330d

def · lines 344–355

utf8CodepointFromThree

Full file
(lead & 0x0F) << 12 | (b1 & 0x3F) << 6 | (b2 & 0x3F)
344def utf8CodepointFromThree =
345  (lambda unrestricted lead : Byte .
346    (lambda unrestricted b1 : Byte .
347      (lambda unrestricted b2 : Byte .
348        (utf8CodepointWord
349          (byteOr
350            (byteShiftLeftTruncated (byteAnd b1 (byte 3)) utf8NaturalSix)
351            (byteAnd b2 (byte 63)))
352          (byteOr
353            (byteShiftLeftTruncated (byteAnd lead (byte 15)) (byte-to-nat (byte 4)))
354            (byteShiftRight (byteAnd b1 (byte 63)) utf8NaturalTwo))
355          (byte 0)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.