toBase10 method

int toBase10(
  1. String string
)

convert string in base 10 exemple '''dart var un = UnBaser(16); print(un.toBase10("5de88"));//output 384648 '''

Implementation

int toBase10(String string) {
  var allIn = true;
  var base = alphabet[62]!;
  for (var element in string.codeUnits) {
    if (!base.contains(String.fromCharCode(element))) {
      allIn = false;
      break;
    }
  }
  if (!allIn) base = alphabet[95]!;
  return _convert2(string, base);
}