Title: | Chilean Rol Unico Tributario |
---|---|
Description: | A RUT (Rol Unico Tributario) is an unique and personal identification number implemented in Chile to identify citizens and taxpayers. Rutifier allows to validate if a RUT exist or not and change between the different formats a RUT can have. |
Authors: | Mauricio Santelices |
Maintainer: | Mauricio Santelices <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.4 |
Built: | 2024-11-14 02:42:15 UTC |
Source: | https://github.com/msantelices/rutifier |
Removes any character that is not a number, K, k, dot or hyphen
clear_rut(rut)
clear_rut(rut)
rut |
Character string |
Returns a character string without said characters
clear_rut('12m345.678-9=')
clear_rut('12m345.678-9=')
Changes the format of a RUT to dots and hyphen
rut_complete(rut, uppercase = FALSE)
rut_complete(rut, uppercase = FALSE)
rut |
RUT to modify. It must be a character string |
uppercase |
Defines if the verification number 'k' should be in uppercase (TRUE) or lowercase (FALSE). By default the value is FALSE |
Returns a RUT in dots and hyphen format
rut_complete('123456789')
rut_complete('123456789')
Changes the format of a RUT to hyphen without dots
rut_hyphen(rut, uppercase = FALSE)
rut_hyphen(rut, uppercase = FALSE)
rut |
RUT to modify. It must be a character string |
uppercase |
Defines if the verification number 'k' should be in uppercase (TRUE) or lowercase (FALSE). By default the value is FALSE |
Returns a RUT in hyphen without dots format
rut_hyphen('123456789')
rut_hyphen('123456789')
Changes the format of a RUT to not contain dots or hyphen
rut_simple(rut, uppercase = FALSE)
rut_simple(rut, uppercase = FALSE)
rut |
RUT to modify. It must be a character string |
uppercase |
Defines if the verification number 'k' should be in uppercase (TRUE) or lowercase (FALSE). By default the value is FALSE |
Returns a RUT whitout dots and hyphen
rut_simple('123456789')
rut_simple('123456789')
Validates a Chilean RUT. The input must be a character string in one of the following formats: RUT with dots and hyphen (Ex. '12.345.678-9'), RUT without dots but with hyphen (Ex. '12345678-9') or RUT without dots and hyphen (Ex. '123456789')
validate_rut(rut)
validate_rut(rut)
rut |
Character str |
Returs TRUE if RUT is valid, else it will return FALSE
validate_rut('123456789') validate_rut('12345678-9') validate_rut('12.345.678-9')
validate_rut('123456789') validate_rut('12345678-9') validate_rut('12.345.678-9')