[][src]Function voca_rs::case::train_case

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

Converts the subject to train case.

Arguments

Example

use voca_rs::*;
case::train_case("goodbye blue sky");
// => "Goodbye-Blue-Sky"
case::train_case("GoodbyeBlueSky");
// => "Goodbye-Blue-Sky"
case::train_case("-Goodbye-Blue-Sky-");
// => "Goodbye-Blue-Sky"
use voca_rs::Voca;
"goodbye blue sky"._train_case();
// => "Goodbye-Blue-Sky"