Skip to content

A general purpose snakecase implementation supporting both ascii and unicode.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rust-playground/snakecase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snakecase   Build Status Latest Version

Snakecase is a general purpose snakecase implementation supporting both ascii and unicode.

Notes: Its algorithm is designed to provide feature parity with this Go snakecase library, but PR's will be accepted for other algorithms and can be hidden behind a feature flag.


[dependencies]
snakecase = "0.1"

Example usages

use snakecase::ascii::to_snakecase;

fn main() {
    let input = "sample text";
    println!("{} => {}", input, to_snakecase(input));
}

or when you need unicode support

use snakecase::unicode::to_snakecase;

fn main() {
    let input = "ƒun sample text";
    println!("{} => {}", input, to_snakecase(input));
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Snakecase by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A general purpose snakecase implementation supporting both ascii and unicode.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages