number_to_string

Function number_to_string 

Source
pub fn number_to_string(value: Decimal) -> String
Expand description

Converts a decimal number to string, handling scientific notation.

ยงExamples

use ccxt_core::precision::number_to_string;
use rust_decimal::Decimal;
use std::str::FromStr;

let num = Decimal::from_str("0.00000123").unwrap();
assert_eq!(number_to_string(num), "0.00000123");

let large = Decimal::from_str("1234567890").unwrap();
assert_eq!(number_to_string(large), "1234567890");