naming-conventions

Naming Conventions

2 stable releases

1.0.1 Sep 6, 2023

#311 in Text editors

MIT license

21KB
486 lines

Naming Conventions

crates.io MSRV Documentation LICENSE codecov Build Status dependency status downloads

Simple and Fast naming convention library.

Quick Start Guide

use naming_conventions::{get_convention, CaseName};

fn main() {
  let snake_case = get_convention(CaseName::SnakeCase);

  let string = "camelCase";

  println!("to snake_case: {}", snake_case.to(string).unwrap());
  println!("is snake_case: {}", snake_case.is(string).unwrap());
}
use naming_conventions::{to_snake_case, is_snake_case};

fn main() {
  let string = "camelCase";

  println!("to snake_case: {}", to_snake_case(string).unwrap());
  println!("is snake_case: {}", is_snake_case(string).unwrap());
}

License

MIT

Dependencies

~2.1–3MB
~55K SLoC