Crate rutilities

Source

Functionsยง

clean_rut
Clean a formatted rut (or with anything, really) to keep only the significant characters. Useful for internal representations and validating.
format_rut
Format a rut with dots every 3 characters and a dash before the last one. Useful to show an internal value. This function cleans the rut, no need to have it clean.
generate_valid_rut
Generate a valid, clean rut. Useful for tests.
is_rut_valid
Check if a given rut is valid