commit | 3963926a9994f839df45168d8574f010676edb56 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue May 21 23:13:34 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue May 21 23:13:34 2024 +0000 |
tree | c7d2adf22ebacd7021672ca3f6319658f3bdbf94 | |
parent | 6da7ff30eee85f437e1fefecd51c7beff742bbe4 [diff] | |
parent | 87af113eb3174cf91651f24cac50cc292284c34f [diff] |
Snap for 11869550 from 87af113eb3174cf91651f24cac50cc292284c34f to 24Q3-release Change-Id: Ic3908a2794f339c658cdbe108dd1aea64cc26c73
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"); }