AP
Size: a a a
AP
AK
my ($class, %opts) = @_
AP
AK
AP
AK
AK
AK
В
AK
AK
AK
AK
AP
$ perl -E '$a="abcdefghijkl"; $b="abcdef01234"; $c = $a ^ $b; say $-[0] if $c =~ m{([^\0])};'
6
AK
$ perl -E '$a="abcdefghijkl"; $b="abcdef01234"; $c = $a ^ $b; say $-[0] if $c =~ m{([^\0])};'
6
sub __lcp {
return undef unless @_;
my $i = 0;
use bytes;
my ($L, $R) = ( length($_[0]), length($_[1]) );
my $max_l = $L > $R ? $R : $L;
for (; $i < $max_l; $i++) {
ord(substr $_[0], $i, 1) == ord(substr $_[1], $i, 1) or last
}
no bytes;
$i
}
AK
SZ
sub __lcp {
return undef unless @_;
my $i = 0;
use bytes;
my ($L, $R) = ( length($_[0]), length($_[1]) );
my $max_l = $L > $R ? $R : $L;
for (; $i < $max_l; $i++) {
ord(substr $_[0], $i, 1) == ord(substr $_[1], $i, 1) or last
}
no bytes;
$i
}
AP
AP