commit | dc24e6839c5cdc1d8553e9041d5cfb96f96b7748 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 05:16:02 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 05:16:02 2023 +0000 |
tree | 7063856b00fcda978586fe349806ad14c4e22c9c | |
parent | 39b1d0fa44587cb55da970199f1ed6721637f0b4 [diff] | |
parent | 614f3fbfe089fb2c359892a3b4f18d9dbbd039e2 [diff] |
Snap for 9722771 from 614f3fbfe089fb2c359892a3b4f18d9dbbd039e2 to udc-d1-release Change-Id: Ic27a4fc52e90ce6c256750c779a5ffc337d58df5
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"); }