This would work: my $b = Buf.new( 0,0,0, 1, 2, 0 ); my $match = Buf.new( 1, 2 );
$b.rotor( $match.elems => 1 - $match.elems ).grep(* eqv $match.List, :k) If you only need the first one, swap out `grep` for `first` Another iffy option is to decode it as latin1 $b.decode('latin1').index($match.decode('latin1')) On Fri, Feb 1, 2019 at 9:22 PM ToddAndMargo via perl6-users <perl6-us...@perl.org> wrote: > > Hi All, > > On a type Buf, what do I use to check for the > position of a byte pattern? > > > Many thanks, > -T