Skip to main content

module_file_stem

Function module_file_stem 

Source
pub fn module_file_stem(name: &str) -> String
Expand description

Return a filesystem-safe stem for the given module name.

Converts PascalCase or ALLCAPS module names to lowercase snake_case, e.g. Certificatecertificate, RFC5280rfc5280, AlgorithmIdentifieralgorithm_identifier.

The stem is suitable for use as a base filename with any extension.