Permalink
Browse files

[GGE::Match] implemented <lower>

  • Loading branch information...
1 parent 4321ee9 commit ca2a9316af30b93d31d583cc473b2387f64d4355 @masak committed Jan 24, 2010
Showing with 13 additions and 3 deletions.
  1. +13 −3 lib/GGE/Match.pm
View
@@ -187,9 +187,19 @@ class GGE::Match {
my $mob = self.new(self);
if $pos < $target.chars
&& (my $char = $target.substr($pos, 1)) ~~ /\w/
- && $char ne '_'
- && $char !~~ /\d/
- && $char eq $char.uc {
+ && $char ne $char.lc {
+ $mob.to = $pos + 1;
+ }
+ return $mob;
+ }
+
+ method lower() {
+ my $target = self.target;
+ my $pos = self.to;
+ my $mob = self.new(self);
+ if $pos < $target.chars
+ && (my $char = $target.substr($pos, 1)) ~~ /\w/
+ && $char ne $char.uc {
$mob.to = $pos + 1;
}
return $mob;

0 comments on commit ca2a931

Please sign in to comment.