mod11 function
Implementation
int mod11(String value, List<int> weights) {
int reducedValue = 0;
List<String> splitValue = value.split("");
for (int i = 0; i < splitValue.length; ++i) {
reducedValue += int.parse(splitValue[i]) * weights[i % weights.length];
}
return ((11 - (reducedValue % 11)) % 11);
}