commit | 0215a06b6be687fcde0bdaeb673b9d668060ba6a | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Mon Apr 29 11:50:38 2024 -0700 |
committer | Xin Li <delphij@google.com> | Mon Apr 29 11:50:38 2024 -0700 |
tree | ac3d3be89ecdf22430217ad0de9783cf725dbd6d | |
parent | 15dc26204f3a5915bf189bb66b9f67371ee6d873 [diff] | |
parent | 96bb293074a0fafb79c46a797abc4df1b39e7ed8 [diff] |
Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future Bug: 337098550 Merged-In: Ifaf4aa7d471cb160d206b74c0438bc7f818cd1cb Change-Id: Ie17d543f56a31967046357d17accd18cffa884e2
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"); }