Documentation
¶
Overview ¶
Package chilerut validates, formats and compares Chilean RUT (Rol Único Tributario) numbers using the standard módulo 11 check-digit algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compact ¶ added in v1.1.0
Compact returns a normalized RUT without separators, including its verification digit (e.g. "12667869K").
func Format ¶
Format returns the canonical "body-dv" form of a RUT (e.g. "12667869-K"), dropping any separators, leading zeros and lowercasing.
func FormatWithDots ¶ added in v1.1.0
FormatWithDots returns the conventional Chilean display form of a RUT (e.g. "12.667.869-K").
func Valid ¶
Valid reports whether rut is a valid RUT by recomputing its módulo 11 check digit. Any common separator format is accepted.
func ValidStrict ¶ added in v1.1.0
ValidStrict reports whether rut uses an accepted RUT syntax and has a valid modulo 11 verification digit.
func VerificationDigit ¶
VerificationDigit computes the expected módulo 11 check digit ("0"-"9" or "K") for the given RUT body.
Types ¶
This section is empty.