Transform a string between camelCase
, PascalCase
, Capital Case
, snake_case
, param-case
, CONSTANT_CASE
and others.
Add this to your Cargo.toml
:
toml
[dependencies]
change-case = "0.1"
```rust use change_case::*;
asserteq!(pascalcase("test string"), "TestString"); asserteq!(camelcase("Test String"), "testString"); asserteq!(captialcase("test string"), "Test String"); asserteq!(snakecase("Test String"), "teststring"); asserteq!(constantcase("test string"), "TESTSTRING"); asserteq!(constantcase("test string"), "TESTSTRING"); asserteq!(param_case("test string"), "test-string"); ```
MIT