last package:bytestring
O(1) Extract the last element of a ByteString, which must be
finite and non-empty. An exception will be thrown in the case of an
empty ByteString.
This is a partial function, consider using
unsnoc instead.
O(1) Extract the last element of a packed string, which must be
non-empty.
O(n/c) Extract the last element of a ByteString, which must be
finite and non-empty.
This is a partial function, consider using
unsnoc instead.
O(1) Extract the last element of a ShortByteString, which must
be finite and non-empty. An exception will be thrown in the case of an
empty ShortByteString.
This is a partial function, consider using
unsnoc instead.
A variety of
last for non-empty ByteStrings.
unsafeLast
omits the check for the empty case. As with
unsafeHead, the
programmer must provide a separate proof that the ByteString is
non-empty.