commit | dffba14e76973a63c0400a5abccefa4ea4ae611c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Nov 30 22:49:00 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Nov 30 22:49:00 2023 +0000 |
tree | fcc75a6f315703b95d4e46b72447b49342bdfd18 | |
parent | 6e29eb7086e4be3e083aea7f909c5bde0871f00c [diff] | |
parent | c82d7835efe710efb7f65fa20ec60d0ba41ac919 [diff] |
Snap for 11160028 from c82d7835efe710efb7f65fa20ec60d0ba41ac919 to emu-34-release Change-Id: I45b1531982b730f3f342c975dd7824b8e01646f3
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"); }