I don't say it's fast, it's just a regex.sub rx_bits { my $str = shift; my $l = 0; $str =~ ( "^" . join "", map "[01]" x ($_ - ($l+0,$l=$_)[0] - 2) . "(?:01|10 +)", @_ ); }
In reply to Re: fast bit twiddling
by japhy
in thread fast bit twiddling
by spurperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |