The constructor of the BaseFormatter class.
A string of symbols for representing the digits, the length of which determining the base number.
Optional parameters, for adjusting conversion rules and the encoding output string formatting.
ReadonlybaseThe base number
ReadonlydigitsThe digits to use.
ReadonlypropertiesThe properties of the class, set by the options of the constructor
Decode an en encoded number according to the instance base and specified digits and properties.
An encoded number as a string in the instance base.
Optionaloptions: BaseFormatterOptionsThe options to use if, for example, alternative characters were specified during encoding.
The decoded number.
DigitNotFound when the specified
string contains unknown characters.
Encodes the specified number according to the instance base and specified digits and properties.
The number to encode, as a number, string or Decimal type.
Optionaloptions: BaseFormatterOptionsThe options to use for formatting.
the encoded number as a string.
Check if the specified value is a number according to the instance base and specified digits and properties.
A string to check.
Whether the specified string is a number.
Staticbase57This method returns an instance of the BaseFormatter
class in base 57 with the digits 0-9A-Ba-b without the characters
Il1O0.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
Staticbase58This method returns an instance of the BaseFormatter
class in base 58 with the digits 0-9A-Ba-b without the characters
IlO0.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
Staticbase62This method returns an instance of the BaseFormatter
class in base 62 with the digits 0-9A-Ba-b.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticbinaryThis method returns an instance of the BaseFormatter
class in base 2 with the digits '01'.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticbyThis method will take the base number, slice a string of digits
0-9A-Za-z to a length equal to the base number and return an
instance of the BaseFormatter class with
the sliced string as the digits.
The base number to use, a maximum of 62.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
MaximumBaseExceeded when
the base number exceeds the maximum amount of this method.
StaticcuneiformThis method returns an instance of the BaseFormatter
class in base 60 using cuneiform digits.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticdecimalThis method returns an instance of the BaseFormatter
class in base 10 with the digits '0123456789'.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticdominoThis method returns an instance of the BaseFormatter
class in base 98 using Unicode domino tiles.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticdozenalThis method returns an instance of the BaseFormatter
class in base 12 with the digits '0123456789↊↋' and the radix
character of ';'. The digits ↊ and ↋ as used by the Dozenal
Societies of America and Great Britain.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticdozenalThis method returns an instance of the BaseFormatter
class in base 12 with the digits '0123456789TE' and the radix
character of ';'. The digits T and E are the ASCII variations of
the digits ↊ and ↋ used by the BaseFormatter.dozenal
method in case a font doesn't have them.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticdozenalThis method returns an instance of the BaseFormatter
class in base 12 with the digits '0123456789XE' and the radix
character of ';'. Uses a variant of the digit for 10 using the
Roman numeral X.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticduodecimalThis method returns an instance of the BaseFormatter
class in base 12 with the digits '0123456789AB'.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StatichexadecimalThis method returns an instance of the BaseFormatter
class in base 16 with the digits '0123456789ABCDEF'.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticoctalThis method returns an instance of the BaseFormatter
class in base 8 with the digits '01234567'.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticsexagesimalThis method returns an instance of the BaseFormatter
class in base 60 with the digits 0-9A-Ba-b without the characters
l0.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
StaticvigesimalThis method returns an instance of the BaseFormatter
class in base 20 with the digits '0123456789ABCDEFGHJK', skipping
over I in order to avoid confusion between I and 1.
Optionaloptions: BaseFormatterOptionsThe options to use.
An instance of the BaseFormatter
class.
The class from which to create a
BaseFormatterinstance for encoding to a string format from specified digits.