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

feat: add methods to manipulate a version #229

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

baszalmstra
Copy link
Collaborator

Adds the following method to Version:

  • Version::with_segments extract specific segments of a version to turn 1.2a.3b.4 into for instance 2a.3b.
  • Version::pop_segments helper method to pop a number of segments from the back. E.g. turn 1.2.3 into 1.2.
  • Version::strip_local removes the local part of a version if it has it. Otherwise returns the version itself.

Fix #228

@baszalmstra baszalmstra requested a review from wolfv June 23, 2023 11:40
@baszalmstra baszalmstra self-assigned this Jun 23, 2023
@wolfv wolfv merged commit e9ba797 into conda:main Jun 23, 2023
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.

version: access element range / bump elements range
2 participants