#ascii #unicode #general #supporting

snakecase

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

1 unstable release

0.1.0 Jul 24, 2019

#859 in Text processing

Download history 86/week @ 2023-12-04 130/week @ 2023-12-11 86/week @ 2023-12-18 96/week @ 2023-12-25 43/week @ 2024-01-01 71/week @ 2024-01-08 100/week @ 2024-01-15 92/week @ 2024-01-22 136/week @ 2024-01-29 136/week @ 2024-02-05 146/week @ 2024-02-12 194/week @ 2024-02-19 143/week @ 2024-02-26 120/week @ 2024-03-04 125/week @ 2024-03-11 94/week @ 2024-03-18

502 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

18KB
403 lines

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.

No runtime deps