# ReCase
[](https://crates.io/crates/recase)
[](https://docs.rs/recase)

[](https://opensource.org/licenses/BSD-2-Clause)
Changes the input text to the desired convention case.
<p> </p>
## Install
Add this to your `Cargo.toml`:
```toml
[dependencies]
recase = "0.2.0"
```
<p> </p>
## Example:
```rust
use recase::ReCase;
fn main() {
const INPUT: &str = "Löng and meaningless-Ẽxample_Text";
let recase1 = ReCase::new_from_str(INPUT);
let recase2 = ReCase::new(String::from(INPUT));
println!("{}", recase1.snake_case()); // Prints "löng_and_meaningless_ẽxample_text"
println!("{}", recase2.camel_case()); // Prints "löngAndMeaninglessẼxampleText"
}
```
<p> </p>
## All supported convention cases:
- camelCase
- snake_case
- PascalCase
- kebab-case
- dot.case
- path/case
- windows\path\case
- normal case
- Title Case
- Sentence case
- Header-Case
- UPPER_CASE_SNAKE_CASE
- aLtErNaTiNg CaSe
<p> </p>
## Limitations
- The crate has not undergone any runtime optimization.
- Some UTF-8 characters can't be lowercased, like "SS" which is the uppercased form of "ß". There might be some more cases that I failed to notice.
<p> </p>
## Acknowledgements
Heavily influenced by [ReCase](https://pub.dev/packages/recase) from [techniboogie-dart](https://github.com/techniboogie-dart).