-
-
Save samcv/bc500628a39aa168444f2e07e2e6806b to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/src/core/Str.pm b/src/core/Str.pm | |
index 2a6d366b3..a55219e39 100644 | |
--- a/src/core/Str.pm | |
+++ b/src/core/Str.pm | |
@@ -2747,6 +2747,12 @@ multi sub infix:<cmp>(str $a, str $b) returns Order:D { | |
ORDER(nqp::cmp_s($a, $b)) | |
} | |
+proto sub infix:<unicmp>(|) { * } | |
+ | |
+multi sub infix:<unicmp>(Str:D \a, Str:D \b) returns Order:D { | |
+ ORDER(nqp::unicmp_s(nqp::unbox_s(a), nqp::unbox_s(b), 7, 0, 0)) | |
+} | |
+ | |
multi sub infix:<===>(Str:D \a, Str:D \b) returns Bool:D { | |
nqp::p6bool( | |
nqp::eqaddr(a.WHAT,b.WHAT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment