heck

Trait MixedCase

Source
pub trait MixedCase: ToOwned {
    // Required method
    fn to_mixed_case(&self) -> Self::Owned;
}
Expand description

This trait defines a mixed case conversion.

In mixedCase, word boundaries are indicated by capital letters, excepting the first word.

§Example:

extern crate heck;
fn main() {
     
    use heck::MixedCase;

    let sentence = "It is we who built these palaces and cities.";
    assert_eq!(sentence.to_mixed_case(), "itIsWeWhoBuiltThesePalacesAndCities");
}

Required Methods§

Source

fn to_mixed_case(&self) -> Self::Owned

Convert this type to mixed case.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MixedCase for str

Implementors§