commit | a3e5f340b9b95b2501ecf48bdae7109b20d594bd | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Wed Feb 01 14:10:55 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Wed Feb 01 14:10:55 2023 +0000 |
tree | 3531c1557e17f21de6d71492399178137a2e000f | |
parent | a3c757545f3449a212d1f23b39a87b8e04d88360 [diff] | |
parent | 084b3d4f22ef45a8454a9153a63a4faf1d4aee51 [diff] |
Snap for 9550733 from 084b3d4f22ef45a8454a9153a63a4faf1d4aee51 to mainline-tzdata5-release Change-Id: Iee3c5525be1b9064ffe64391b3c9066991385e9e
This crate provides a fast conversion of integer primitives to decimal strings. The implementation comes straight from libcore but avoids the performance penalty of going through core::fmt::Formatter
.
See also ryu
for printing floating point primitives.
Version requirement: rustc 1.36+
[dependencies] itoa = "1.0"
fn main() { let mut buffer = itoa::Buffer::new(); let printed = buffer.format(128u64); assert_eq!(printed, "128"); }