[][src]Trait heck::SnakeCase

pub trait SnakeCase: ToOwned {
    pub fn to_snake_case(&self) -> Self::Owned;
}

This trait defines a snake case conversion.

In snake_case, word boundaries are indicated by underscores.

Example:

use heck::SnakeCase;

let sentence = "We carry a new world here, in our hearts.";
assert_eq!(sentence.to_snake_case(), "we_carry_a_new_world_here_in_our_hearts");

Required methods

pub fn to_snake_case(&self) -> Self::Owned[src]

Convert this type to snake case.

Loading content...

Implementations on Foreign Types

impl SnakeCase for str[src]

Loading content...

Implementors

Loading content...