commit | d3b49490bde0893bb9ccc92370a8a69faec84aa5 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Aug 29 01:13:27 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Aug 29 01:13:27 2024 +0000 |
tree | a9dc2703ec0d79ea9c1722b17c7779250dd58adc | |
parent | 5ebcd004e2528eed7537780cc9bbb5edb5d250ce [diff] | |
parent | a7fea7e71ebe006f8218f2ba36beedf0c757a147 [diff] |
Snap for 12291679 from a7fea7e71ebe006f8218f2ba36beedf0c757a147 to 25D4-release Change-Id: I226a4276391f50009d5bac8f21bbf7bbcf265bb1
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"); }