commit | 5ebcd004e2528eed7537780cc9bbb5edb5d250ce | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Aug 27 23:14:38 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Aug 27 23:14:38 2024 +0000 |
tree | cddf0242bb53f39d0f5b9d0b3c46af8a8386b4a8 | |
parent | 4647740446302c6c89211cf838c6ec0ffd4d1033 [diff] | |
parent | ec62bc1680ff8c000bd4693fc3c3a17313d0ed39 [diff] |
Snap for 12282710 from ec62bc1680ff8c000bd4693fc3c3a17313d0ed39 to 25D4-release Change-Id: Ia23dfce58496620605d4bf4a91ab96210f2d8993
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"); }