commit | f275c655a0d9d8d418d12aa16013d1ba1e02a4ef | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat Feb 04 04:16:48 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat Feb 04 04:16:48 2023 +0000 |
tree | 78be25a2965dba0c8fc19b48749b6b08a6989b60 | |
parent | 632cd58971ad065a9a8f9c1c289189c5a699bb5f [diff] | |
parent | da1bb4c9e233769e341cdbdcfd5760a8332d9727 [diff] |
Snap for 9562441 from da1bb4c9e233769e341cdbdcfd5760a8332d9727 to udc-release Change-Id: I2ab5674dc801a2d20452d3455c8cfd515ac3b827
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"); }