commit | 3d863bc167fe77f5ed60a7d09c0b470ccdee0a56 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Oct 15 23:11:08 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Oct 15 23:11:08 2024 +0000 |
tree | c96ceff2a9a4fe0e40611fad539e9e9aaea87795 | |
parent | 0dc61357727fa2caa511bc596e03616d5317469b [diff] | |
parent | 5068c0ddc14aeb3ed5c894cabc22b0d264af8f61 [diff] |
Snap for 12503729 from 5068c0ddc14aeb3ed5c894cabc22b0d264af8f61 to sdk-release Change-Id: I94e8c65315e09a2fe5b9d52792352f2bbd84d3f9
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"); }