Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

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

Open
coke opened this issue Jan 18, 2013 · 0 comments
Open

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

coke opened this issue Jan 18, 2013 · 0 comments

Comments

@coke
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant