[][src]Function lexical::to_string

pub fn to_string<N: ToLexical>(n: N) -> String

High-level conversion of a number to a decimal-encoded string.

  • n - Number to convert to string.

Examples

assert_eq!(lexical::to_string(5), "5");
#[cfg(not(feature = "trim_floats"))]
assert_eq!(lexical::to_string(0.0), "0.0");