tree: 4ba2a031ab2f2564da0a3f8d8742bd7e9e5dee25 [path history] [tgz]
  1. benches/
  2. src/
  3. tests/
  4. .android-checksum.json
  5. .cargo-checksum.json
  6. Android.bp
  7. Cargo.toml
  8. cargo_embargo.json
  9. LICENSE-APACHE
  10. METADATA
  11. MODULE_LICENSE_APACHE2
  12. README.md
  13. 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