[][src]Function voca_rs::case::snake_case

pub fn snake_case(subject: &str) -> String

Converts the subject to snake case.

Arguments

Example

use voca_rs::*;
case::snake_case("learning to fly");
// => "learning_to_fly"
case::snake_case("LearningToFly");
// => "learning_to_fly"
case::snake_case("-Learning-To-Fly-");
// => "learning_to_fly"
use voca_rs::Voca;
"learning to fly"._snake_case();
// => "learning_to_fly"