camel 1.0.3

Supports bidirectional conversion of variable strings between common naming formats.
Documentation

camel

Crates.io Version Crates.io Total Downloads docs.rs GitHub commit activity GitHub Repo stars

Supports bidirectional conversion of variable strings between common naming formats.

Full documentation →

Quick start

cargo add camel

Usage

//! Usage examples for the camel case conversion library.

use camel::{camel_case, flat_case, kebab_case, pascal_case, snake_case, title_case, train_case};

fn main() {
    let s = "foo_bar-Baz";
    println!("Input:     {}", s);
    println!("camelCase: {}", camel_case(s, true));
    println!("PascalCase: {}", pascal_case(s, true));
    println!("kebab-case: {}", kebab_case(s));
    println!("snake_case: {}", snake_case(s));
    println!("flatcase:  {}", flat_case(s));
    println!("Train-Case: {}", train_case(s, true));
    println!("Title Case: {}", title_case(s, true));
}

License

Published under the Apache-2.0 license. Made by @UnRUST 💛


🛠️ auto updated with automd-rs