commit | 5ecddc1af151a285c30e081f348c4d08ab48408b | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Wed Sep 11 23:28:22 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Wed Sep 11 23:28:22 2024 +0000 |
tree | a9dc2703ec0d79ea9c1722b17c7779250dd58adc | |
parent | 0718cc18d7f087e92facd4d377ca9ff37723f86d [diff] | |
parent | 015881526c420d7bd7047fa0e86a31dc9d02842a [diff] |
Snap for 12355814 from 015881526c420d7bd7047fa0e86a31dc9d02842a to build-tools-release Change-Id: Ie186de34cad5ac3f6e8eba43a4faf187c7755dc7
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"); }