commit | 93dc42e055f4f3d2198abba85a84e8cb5286d4ef | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Mar 14 18:11:40 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Mar 14 18:11:40 2024 +0000 |
tree | ac3d3be89ecdf22430217ad0de9783cf725dbd6d | |
parent | 7a32db877fba05ba6cc9651335c7c8d48a114b04 [diff] | |
parent | 15dc26204f3a5915bf189bb66b9f67371ee6d873 [diff] |
Snap for 11574415 from 15dc26204f3a5915bf189bb66b9f67371ee6d873 to emu-35-1-release Change-Id: Idd942713f19568f93e92abb6d627619a4e8e7195
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"); }