tree: 56c7a5484e76343e7cb4e89e03354f2b84143c32 [path history] [tgz]
  1. benches/
  2. patches/
  3. src/
  4. tests/
  5. .cargo-checksum.json
  6. Android.bp
  7. Cargo.toml
  8. cargo_embargo.json
  9. LICENSE
  10. LICENSE-APACHE
  11. LICENSE-MIT
  12. METADATA
  13. MODULE_LICENSE_APACHE2
  14. README.md
  15. TEST_MAPPING
crates/itoa/README.md

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