Luhn class
A class with only static members to make the functions namespaced
Constructors
- Luhn()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
computeAndAppendCheckDigit(
String value) → String -
Compute the check digit of the numeric sequence
value
and append it to it, returning a new string with the check digit attached -
computeCheckDigit(
String value) → int -
Compute the check digit of the sequence of numbers
value
and return it as an integer -
isValidNumber(
String value) → bool -
Returns true if the number sequence
value
has a valid Luhn check digit