C# Class Funcular.IdGenerators.BaseConversion.BaseConverter

A Base36 De- and Encoder
Adapted from the base36 encoder at http://www.stum.de/2008/10/20/base36-encoderdecoder-in-c/
显示文件 Open project: piranout/Funcular.IdGenerators Class Usage Examples

Public Methods

Method Description
Convert ( string number, int fromBase, int toBase ) : string

Convert a number (expressed as a string) from fromBase to toBase

DecimalToArbitrarySystem ( long decimalNumber, int radix ) : string

Converts the given decimal number to the numeral system with the specified radix (in the range [2, 36]).

Method Details

Convert() public static method

Convert a number (expressed as a string) from fromBase to toBase
public static Convert ( string number, int fromBase, int toBase ) : string
number string String representation of the number to be converted
fromBase int The current base of the number
toBase int The desired base to convert to
return string

DecimalToArbitrarySystem() public static method

Converts the given decimal number to the numeral system with the specified radix (in the range [2, 36]).
public static DecimalToArbitrarySystem ( long decimalNumber, int radix ) : string
decimalNumber long The number to convert.
radix int The radix of the destination numeral system (in the range [2, 36]).
return string