IntegerString

IntegerString[n]
gives a string consisting of the decimal digits in the integer n.

IntegerString[n,b]
gives a string consisting of the base b digits in the integer n.

IntegerString[n,b,len]
pads the string on the left with zero digits to give a string of length len.

IntegerString[n,"Roman"]
gives the Roman numeral form of n.

DetailsDetails

  • The maximum allowed base is 36. For bases larger than 10, additional digits are chosen from the letters az.
  • If len is less than the number of digits in n then the len least significant digits are returned.
  • FromDigits can be used as the inverse of IntegerString.
Introduced in 2007
(6.0)