Bug: 166632747

Clone this repo:
  1. 5068c0d Migrate 25 crates to monorepo by James Farrell · 4 months ago main master
  2. e390b0d Fix cargo_embargo.json and regenerate Android.bp by James Farrell · 4 months ago
  3. 0158815 Marks itoa available in OEM apexes. am: b7faf345e7 by Dmitry Avershin · 5 months ago
  4. b7faf34 Marks itoa available in OEM apexes. by Dmitry Avershin · 5 months ago
  5. 7807c5b Marks itoa available in OEM apexes. am: b99db4a687 by Dmitry Avershin · 5 months ago

itoa

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"

Example

fn main() {
    let mut buffer = itoa::Buffer::new();
    let printed = buffer.format(128u64);
    assert_eq!(printed, "128");
}

Performance (lower is better)

performance

License