commit | 2d644b45c58df206b06c4c71775dbf897d9e0c45 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri May 26 10:18:18 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri May 26 10:18:18 2023 +0000 |
tree | 7063856b00fcda978586fe349806ad14c4e22c9c | |
parent | da1bb4c9e233769e341cdbdcfd5760a8332d9727 [diff] | |
parent | d061e566351651e6fdf815bc366eb12aaf06e778 [diff] |
Snap for 10209341 from d061e566351651e6fdf815bc366eb12aaf06e778 to mainline-healthfitness-release Change-Id: Ib8803eac3ac5ab0a05058d80106f3f60687425fc
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"); }