convert-case
convert-case copied to clipboard
Add without_boundaries to Casing trait
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)
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.