View Source ElixirCLRut.CheckDigit (ElixirCLRUT v1.0.0)

The Check Digit allows to verify if a RUT is correctly formed.

Link to this section Summary

Functions

Calculates the check digit following the modulo 11 algorithm. Receives a list of numbers.

Removes the last item from the list. Used for cleaning up the check digit before the algorithm.

Link to this section Functions

Link to this function

get(normalized)

View Source (since 1.0.0)
@spec get(list()) :: String.t()

Calculates the check digit following the modulo 11 algorithm. Receives a list of numbers.

examples

Examples

iex> get([2,2,2,8,2,5,0])
"6"
Link to this function

remove(normalized)

View Source (since 1.0.0)
@spec remove(list()) :: list()

Removes the last item from the list. Used for cleaning up the check digit before the algorithm.

examples

Examples

iex> remove([2,2,2,8,2,5,0,6])
[2,2,2,8,2,5,0]