Last active
December 17, 2015 18:19
-
-
Save sergot/5652184 to your computer and use it in GitHub Desktop.
Removes string $b from string $a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v6; | |
| multi sub infix:<->(Str $a, Str $b) { | |
| nqp::join('', nqp::split($b, $a)); | |
| } | |
| say 'a b c' - ' ' - 'a'; | |
| say 5 - 2; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OUTPUT:
bc
3