Bytes.ends_with: def of bend-kit-bytes@0.3.3.0 Import: import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes Lines 489-493 of bend-kit-bytes@0.3.3.0/bytes.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&start_line=489&end_line=493 import Base # Does b end with suffix (a byte string)? def ends_with(b: Bytes, +suffix: String) -> Bytes & Bool: Bytes{+len, buf} = b +m = count(suffix, 0) at.if(U32.is_le(m, len), len, buf, suffix, (len - m : U32)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=at.if https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=count