Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix String.right(count) not returning the last count characters of a string #47434

Closed
wants to merge 1 commit into from

Conversation

madmiraal
Copy link
Contributor

As originally identified by @KoBeWi here, String.right(count) doesn't behave as expected. Instead of returning the last count characters of a string, it currently behaves like String.substr(position). This PR modifies the behaviour of String.right(count) to return the last count characters of a string i.e. String.substr(length() - count).

Part of #16863.

@KoBeWi
Copy link
Member

KoBeWi commented Mar 28, 2021

I already have opened a PR for this change: #36180

@madmiraal
Copy link
Contributor Author

Closed as duplicate of #36180.

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

Successfully merging this pull request may close these issues.

3 participants