Even more fun with match():
Stdio.Buffer("1 2-3")->match("%d%d%d");
(1) Result: 0
I have now changed so that UNDEFINED is returned on mismatch:
undefinedp(Stdio.Buffer("1 2-3")->match("%d%d%d"));
(2) Result: 0
undefinedp(Stdio.Buffer("#1 2-3")->match("%d%d%d"));
(3) Result: 1
This one is also fun:
Stdio.Buffer("1 2-3")->match("%0s%d%d%d");
(4) Result: "12-3"