Skip to content

Commit

Permalink
Native str doesn't do METAOP yet
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Sep 5, 2014
1 parent 8591319 commit 3f87260
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/core/Str.pm
Expand Up @@ -809,19 +809,18 @@ my class Str does Stringy { # declared in BOOTSTRAP

$j = $j + 1 while !(nqp::iscclass(nqp::const::CCLASS_LOWERCASE, $pat, $j) ||
nqp::iscclass(nqp::const::CCLASS_UPPERCASE, $pat, $j) );
$ret ~= nqp::substr($str,$i,$j - $i) if $i != $j;
$ret = $ret ~ nqp::substr($str,$i,$j - $i) if $i != $j;
$i = $j;

$j = $j + 1 while nqp::iscclass(nqp::const::CCLASS_LOWERCASE, $pat, $j);
$ret ~= nqp::lc(nqp::substr($str,$i,$j - $i)) if $i != $j;
$ret = $ret ~ nqp::lc(nqp::substr($str,$i,$j - $i)) if $i != $j;
$i = $j;

$j = $j + 1 while nqp::iscclass(nqp::const::CCLASS_UPPERCASE, $pat, $j);
$ret ~= nqp::uc(nqp::substr($str,$i,$j - $i)) if $i != $j;
$ret = $ret ~ nqp::uc(nqp::substr($str,$i,$j - $i)) if $i != $j;
$i = $j;
}
$ret ~= nqp::substr($str,$i);
$ret;
$ret ~ nqp::substr($str,$i);
}

method samespace(Str:D: Str:D $pat) {
Expand Down

0 comments on commit 3f87260

Please sign in to comment.