base2dec function

Convert a string of numeral digits from some base into decimal notation.