Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
native infix:<xx> operator
  • Loading branch information
moritz committed Apr 12, 2012
1 parent 200926b commit 05b1cb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Str.pm
Expand Up @@ -788,6 +788,9 @@ multi infix:<x>(Str:D $s, Int:D $repetition) {
?? ''
!! nqp::p6box_s(nqp::x(nqp::unbox_s($s), nqp::unbox_i($repetition)))
}
multi infix(str $s, int $repetition) returns str {
$repetition <= 0 ?? '' !! nqp::x($s, $repetition);
}

multi infix:<cmp>(Str:D \$a, Str:D \$b) {
Order.(nqp::p6box_i(nqp::cmp_s(nqp::unbox_s($a), nqp::unbox_s($b))))
Expand Down

0 comments on commit 05b1cb1

Please sign in to comment.