commit | df1b32692bdb086b5d60cfa728a2c895823b8194 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Jun 22 17:08:36 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Jun 22 17:08:36 2023 +0000 |
tree | 7063856b00fcda978586fe349806ad14c4e22c9c | |
parent | 7921e779f63e8cf4486c4fbaa5b1aefdc77b1c96 [diff] | |
parent | ff1b83b00cc9f0cbaf764d13f472e39063f9c1f3 [diff] |
Snap for 10363732 from ff1b83b00cc9f0cbaf764d13f472e39063f9c1f3 to emu-33-release Change-Id: Ic92a37ccd2814d9c569e992e53e12a53d763ca96
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"); }