commit | d0c712d8e6833548ca357e738bdf4d38321368e0 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 02:20:37 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 02:20:37 2023 +0000 |
tree | 7063856b00fcda978586fe349806ad14c4e22c9c | |
parent | f275c655a0d9d8d418d12aa16013d1ba1e02a4ef [diff] | |
parent | d061e566351651e6fdf815bc366eb12aaf06e778 [diff] |
Snap for 9719949 from d061e566351651e6fdf815bc366eb12aaf06e778 to udc-release Change-Id: I36ac54a9455bec0863ad9e9c5c16d3d8c5deb3ae
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"); }