pub fn kebab_case(original: &str) -> String {
	// Match groups of alphanumeric characters
	let re = Regex::new(r"([A-Za-z0-9])+").unwrap();

	// Match and add all the filtered groups into into a Vec
	let mut parts: Vec<&str> = Vec::new();
	for mat in re.find_iter(&original) {
		parts.push(mat.as_str());
	}

	// Generate kebab-cased string
	parts.join("-").to_lowercase()
}
/// Convert a string to an alphanumeric kebab-cased string.
Convert a string to an alphanumeric kebab-cased string.
Convert a string to an alphanumeric kebab - cased string .
pub fn kebab_case(original: &str) -> String {
	// Match groups of alphanumeric characters
	let re = Regex::new(r"([A-Za-z0-9])+").unwrap();
	// Match and add all the filtered groups into into a Vec
	let mut parts: Vec<&str> = Vec::new();
	for mat in re.find_iter(&original) {
		parts.push(mat.as_str());
	}
	// Generate kebab-cased string
	parts.join("-").to_lowercase()
}
pub fn kebab_case ( original : & str ) -> String { // Match groups of alphanumeric characters let re = Regex :: new ( r"([A-Za-z0-9])+" ) . unwrap ( ) ; // Match and add all the filtered groups into into a Vec let mut parts : Vec < & str > = Vec :: new ( ) ; for mat in re . find_iter ( & original ) { parts . push ( mat . as_str ( ) ) ; } // Generate kebab-cased string parts . join ( " " ) . to_lowercase ( ) }
Convert a string to an alphanumeric kebab-cased string.
Convert a string to an alphanumeric kebab - cased string .
original
&str