Crate naming_lib[][src]

Expand description

Library for identifying and converting identifiers naming format (case | notation).

It serves three purposes:

  1. Judge if an identifier is written in a certain format. (example: is_camel())

  2. Automatically identify format with which_case().

  3. Convert identifiers between different naming formats. (example: to_camel())

Enums

Indicates which format the string belongs to, and acts as an intermediary between format conversions.

Functions

Create a NamingCase value from an identifier.

Return a Pascal enum for a hungarian notation identifier, remove the first word which representing the variable type.

Matches r"^\[a-z]+\d*(\[A-Z]\[a-z]*\d*)*$".

Matches r"^\[a-z]+\d*(-\[a-z]+\d*)*$".

Matches r"^(\[A-Z]\[a-z]*\d*)+$".

Matches r"^\[A-Z]+\d*(_\[A-Z]+\d*)*$".

Matches r"^(?:\[a-z]+|\[A-Z]+|\[A-Z]\[a-z]+)\d*$".

Matches r"^\[a-z]+\d*(_\[a-z]+\d*)*$".

Determine which format the identifier belongs to. Alias of NamingCase::new() and from().