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

Add retreat counterpart of advance #20

Closed
wants to merge 2 commits into from
Closed

Conversation

glebm
Copy link
Contributor

@glebm glebm commented Nov 28, 2018

prior is to next what retreat is to advance

@glebm glebm force-pushed the retreat branch 2 times, most recently from de44c94 to fe90166 Compare November 28, 2018 00:31
`prior` is to `next` what `retreat` is to `advance`
glebm added a commit to glebm/libsass that referenced this pull request Nov 28, 2018
Fixes sass#2657

Incorporates the following utfcpp patches:

1. Sass addition of `retreat`.
   nemtrif/utfcpp#20

2. Fix for `replace_invalid` throwing on incomplete sequence at the end
   of the input.
   nemtrif/utfcpp#21
xzyfer pushed a commit to sass/libsass that referenced this pull request Nov 28, 2018
Fixes #2657

Incorporates the following utfcpp patches:

1. Sass addition of `retreat`.
   nemtrif/utfcpp#20

2. Fix for `replace_invalid` throwing on incomplete sequence at the end
   of the input.
   nemtrif/utfcpp#21
@nemtrif
Copy link
Owner

nemtrif commented Apr 2, 2019

There is no "retreat" in the standard library, so this could be confusing. I should probably ensure that utf8::advance() retreats for a negative distance.

@nemtrif nemtrif closed this Apr 2, 2019
@glebm
Copy link
Contributor Author

glebm commented Apr 3, 2019

Thanks, I wasn't aware having only standard library-like methods was a design decision.

There is no prior in the standard library either, but there is std::prev (and std::next can go backwards).

@glebm glebm deleted the retreat branch April 28, 2019 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants