Function luhn_sum

Synopsis

#include "breeze/checksum/luhn.hpp"

int luhn_sum(std::string const &s)

Description

Returns
The Luhn sum of the given string. This is a number in [0, 9].
Exceptions
A std::invalid_argument if any of the characters in s is not a decimal digit (i.e. one of 0123456789).

Source

Line 32 in breeze/checksum/luhn.hpp.