def same_as_list

bend-osdev-bytes@0.1.1.0 · check.bend:27

import bend-osdev-bytes@0.1.1.0/check.bend as Check
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B

27# the fast Octets forms against the list layer, on a string short enough for
28# the structural list functions
29def same_as_list(+o: B.Octets) -> Bool:
30  Bool.and(String.eq(B.Octets.hex(o), B.hex(B.Octets.to_list(o))), String.eq(B.Octets.to_string(o), B.to_string(B.Octets.to_list(o))))

Uses (9)

Used by (1)