const_i128_to_str

Function const_i128_to_str 

Source
pub const fn const_i128_to_str(n: i128) -> UtilBufWrapper<40>
Expand description

Converts an i128 to a str as a byte array. The buffer is 40 bytes long. The maximum number of digits in an i128 is 39. The first byte is a ‘-’ if the number is negative.

§Example

use local_fmt::utils::const_i128_to_str;

const BUFFER: &[u8] = const_i128_to_str(-1234567890).buffer();
assert_eq!(BUFFER, b"-1234567890");