commit | e402a8e4eaeff2493bb0e8e802331cd13f71f360 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Wed Aug 28 23:12:56 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Wed Aug 28 23:12:56 2024 +0000 |
tree | a9dc2703ec0d79ea9c1722b17c7779250dd58adc | |
parent | 0e85fede47a53cb25e81380f9dd387fdc3f6c791 [diff] | |
parent | a7fea7e71ebe006f8218f2ba36beedf0c757a147 [diff] |
Snap for 12289667 from a7fea7e71ebe006f8218f2ba36beedf0c757a147 to 24Q4-release Change-Id: I57f55521bf7b17c753a5188805268dc53f9a391a
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"); }