in reply to Re: Re: Re: Regexp for alphbetical order match within the string
in thread Regexp for alphabetical order match within the string
while this very similar model is actually slowersub improved { my $lstr = lc shift; my ($p, $ntst) = (length($lstr)-1); chop($ntst = substr($lstr, $p, 2)) lt $ntst and return 0 while ($p--); 1; }
sub hobbled { my $str = lc shift; my ($p, $x) = (length($str)-1); chop($x) lt $x and return 0 while $x = substr($str, $p--, 2); 1; }
|
|---|