commit | 2fbaae00a2a8b942136fa33ee4c5fe2669b41a2e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat Feb 03 02:11:54 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat Feb 03 02:11:54 2024 +0000 |
tree | ac3d3be89ecdf22430217ad0de9783cf725dbd6d | |
parent | 5e4533e9d341c1fb25c558c552f145eb11e95ddb [diff] | |
parent | 96bb293074a0fafb79c46a797abc4df1b39e7ed8 [diff] |
Snap for 11399874 from 96bb293074a0fafb79c46a797abc4df1b39e7ed8 to 24D1-release Change-Id: I6a3e518922f9347e682fededc143e756167723c5
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"); }