commit | c87d33a1c38a921252aee713960e8181a5ec07f2 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue May 21 23:09:42 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue May 21 23:09:42 2024 +0000 |
tree | c7d2adf22ebacd7021672ca3f6319658f3bdbf94 | |
parent | 68e8266e9dfbf47c717a5a43a67b9a9281aaf3db [diff] | |
parent | 876f7e9d539ca831080e640c1900b02f0c7ac758 [diff] |
Snap for 11871564 from 876f7e9d539ca831080e640c1900b02f0c7ac758 to sdk-release Change-Id: Iecbbaee2dc8ee522d79c8d60d6538227b3b76a1a
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"); }