commit | 6da7ff30eee85f437e1fefecd51c7beff742bbe4 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat May 11 01:12:54 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat May 11 01:12:54 2024 +0000 |
tree | 8d2e4ee1cd21a39294190c098863c9b632beb35a | |
parent | 75ce9044a24a759b67782ac8230418461fad8975 [diff] | |
parent | f400a376ea3bb3c7e0c3a5118d5956d35d367551 [diff] |
Snap for 11828632 from f400a376ea3bb3c7e0c3a5118d5956d35d367551 to 24Q3-release Change-Id: Ibf00dfc2affd9dda498cd77ba20b79a668dbd9a5
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"); }