base

Convert a Number or numeric String between numeric bases.


Syntax


Parameters

  • Mixed subject - The number to convert.
    • String - The String will be treated as a number of base from. There is no practical limit to the length that can be handled.
    • Number - The Number will be treated as a number of base from. If the number is too big to hold as a standard number, it should be given as a String.
  • Number from - The numeric base to convert from.
  • Number to - The numeric base to convert to.
  • String fromchars - The character list to use for the from base. If omitted, it will default to the numbers 0-9 followed by the letters a-z. This gives a maximum of base 36. If higher bases are to be used, longer strings need to be specified, up to a maximum of 256.
  • String tochars - The character list to use for the to base. If omitted, fromchars will be used.


Result

  • String - The converted number, in String form.

Returns a String containing numeric subject converted to a different numeric base.