commit | c42c4eaf61c61127a4c1907f0171b453780fade4 | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Thu Mar 09 18:06:53 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Mar 09 18:06:53 2023 +0000 |
tree | 7063856b00fcda978586fe349806ad14c4e22c9c | |
parent | da1bb4c9e233769e341cdbdcfd5760a8332d9727 [diff] | |
parent | d061e566351651e6fdf815bc366eb12aaf06e778 [diff] |
Make itoa available to product and vendor am: b3aca06ece am: 7921e779f6 am: ff1b83b00c am: d061e56635 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/itoa/+/2475773 Change-Id: I8643eee45ee0b7cba9c106aad8ed3ea9bf82cb6e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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"); }