commit | d0ecc015a4a48bf644a55629df1048f8ff73f62c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat Feb 03 02:12:35 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat Feb 03 02:12:35 2024 +0000 |
tree | ac3d3be89ecdf22430217ad0de9783cf725dbd6d | |
parent | 21306d9521e0814ffb1c74645742e62f7b4f18fc [diff] | |
parent | 96bb293074a0fafb79c46a797abc4df1b39e7ed8 [diff] |
Snap for 11399958 from 96bb293074a0fafb79c46a797abc4df1b39e7ed8 to 24Q2-release Change-Id: I18a79cc64a93193ccd84c65fae8ca3b85fecd844
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"); }