commit | 4abae58085457d394fdba2722d229f3c616eac58 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon Apr 10 18:00:10 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Mon Apr 10 18:00:10 2023 +0000 |
tree | 7063856b00fcda978586fe349806ad14c4e22c9c | |
parent | ef8ce91821b96896034854ce08a748c165239b19 [diff] | |
parent | d0c712d8e6833548ca357e738bdf4d38321368e0 [diff] |
Snap for 9900366 from d0c712d8e6833548ca357e738bdf4d38321368e0 to udc-beta2-release Change-Id: I78b52dda4d0f9bb8140648a262b60f70c64cdb6d
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"); }