Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

substr uses p5 style "from the end" syntax #26

coke opened this Issue Jan 18, 2013 · 0 comments


None yet
1 participant

coke commented Jan 18, 2013

< [Coke]> pugs: my $str = "foobar"; say substr($str, *-1);
<+p6eval> pugs: OUTPUT«foobar␤»
< [Coke]> pugs: my $str = "foobar"; say substr($str, -1);
<+p6eval> pugs: OUTPUT«r␤»

See t/spec/S32-str/substr.t for tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment