/// This trait defines a kebab case conversion. /// /// In kebab-case, word boundaries are indicated by hyphens. /// /// ## Example: /// /// ```rust /// use heck::ToKebabCase; /// /// let sentence = "We are going to inherit the earth."; /// assert_eq!(sentence.to_kebab_case(), "we-are-going-to-inherit-the-earth"); /// ``` pubtrait ToKebabCase: ToOwned { /// Convert this type to kebab case. fn to_kebab_case(&self) -> Self::Owned;
}
/// This wrapper performs a kebab case conversion in [`fmt::Display`]. /// /// ## Example: /// /// ``` /// use heck::AsKebabCase; /// /// let sentence = "We are going to inherit the earth."; /// assert_eq!(format!("{}", AsKebabCase(sentence)), "we-are-going-to-inherit-the-earth"); /// ``` pubstruct AsKebabCase<T: AsRef<str>>(pub T);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.