[][src]Crate sanename

Enums

Convention

Functions

convert_from

Convert a string with another naming convention to sanename-package convention.

convert_to

Convert a package-name format string to another naming convention.

sanitize

Takes a String in any format and returns sanename-package format discarding stuff sanename does not approve of. Implicit trimming of whitespace. Common delimiters are converted to at most one sequential -

validate

Validate a sanename package name

validate_camel_case

Validate camelCase: with lowercase leading letter. e.g. sanenamePackage2

validate_class_name

Validate CamelCase: with leading uppercase letter. e.g. SanenamePackage2

validate_constant

Validate CONSTANT_CASE: uppercase separated by underscore e.g. SANENAME_PACKAGE2

validate_len

sanenames should be 3 - 32 chars, validation of this is optional.

validate_sanename

Validate a sanename package name format i.e. [a-z][a-z0-9]*(-[a-z][a-z0-9]*)* e.g. sanename-package2

validate_sanename_word

Validate a single word in a sanename, i.e. no dashes for separating words. e.g. sanename

validate_snake_case

Validate kernel_case: lowercase separated by underscore e.g. sanename_package2