src/NeinMath/IntegerConverter.cs
/// <summary>
/// Returns the specified Integer as a decimal string.
/// </summary>
/// <param name="value">The number to convert.</param>
/// <returns>A decimal string.</returns>
Returns the specified Integer as a decimal string.
Returns the specified Integer as a decimal string .
public static string ToDecimalString(this Integer value)
        {
            if (value.length == 0)
                return "0";
            var result = "";
            var bits = value.bits;
            var length = value.length;
            while (length > 0)
            {
                var r = 0U;
                bits = Calc.Divide(bits, length, 1000000000U, out r);
                result = r.ToString("000000000", CultureInfo.InvariantCulture)
                    + result;
                length = Bits.Length(bits, length);
            }
            result = result.TrimStart('0');
            if (value.sign)
                result = '-' + result;
            return result;
        }
public static string ToDecimalString ( this Integer value ) { if ( value . length == 0 ) return " " ; var result = " " ; var bits = value . bits ; var length = value . length ; while ( length > 0 ) { var r = 0U ; bits = Calc . Divide ( bits , length , 1000000000U , out r ) ; result = r . ToString ( " " , CultureInfo . InvariantCulture ) + result ; length = Bits . Length ( bits , length ) ; } result = result . TrimStart ( ' ' ) ; if ( value . sign ) result = ' ' + result ; return result ; }
Returns the specified Integer as a decimal string.
Returns the specified Integer as a decimal string .
A decimal string.
A decimal string .
Integer
this
value
The number to convert.
The number to convert .