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 without_boundaries to Casing trait #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

duskmoon314
Copy link

Intro

Add without_boundaries to the Casing trait to allow the below usage:

"2dTransFormation".without_boundaries(&Boundary::digits()).to_case(Case::Snake)

Motivation

There is a with_boundaries method in both Casing and StateConverter. But we can only use without_boundaries with StateConverter. It is convenient to have without_boundaries in Casing.

Worry

  • Haven't fully tested this. Though the code in the doc seems working well.
  • Adding a method to the Casing trait is a breaking change. (IMO)

@duskmoon314
Copy link
Author

I have used and it seems to work well.

@rutrum Would you please review this? I think it is useful when want to convert the case of str without several boundaries.

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.

None yet

1 participant