Trait heck::KebabCase [−][src]
pub trait KebabCase: ToOwned { fn to_kebab_case(&self) -> Self::Owned; }
This trait defines a kebab case conversion.
In kebab-case, word boundaries are indicated by hyphens.
Example:
extern crate heck; fn main() { use heck::KebabCase; let sentence = "We are going to inherit the earth."; assert_eq!(sentence.to_kebab_case(), "we-are-going-to-inherit-the-earth"); }
Required Methods
fn to_kebab_case(&self) -> Self::Owned
Convert this type to kebab case.
Implementations on Foreign Types
impl KebabCase for str
[src]
impl KebabCase for str
fn to_kebab_case(&self) -> Self::Owned
[src]
fn to_kebab_case(&self) -> Self::Owned