MCPcopy Index your code
hub / github.com/dtolnay/itoa

github.com/dtolnay/itoa @1.0.18

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.18 ↗ · + Follow
19 symbols 27 edges 5 files 3 documented · 16% updated 13d ago1.0.18 · 2026-03-20★ 3791 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

itoa

github crates.io docs.rs build status

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 [zmij] for printing floating point primitives.

[dependencies]
itoa = "1.0"

Example

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

Performance

The itoa-benchmark compares this library and other Rust integer formatting implementations across a range of integer sizes. The vertical axis in this chart shows nanoseconds taken by a single execution of itoa::Buffer::new().format(value) so a lower result indicates a faster library.

performance

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

Integer (Interface)
An integer that can be written into an [`itoa::Buffer`][Buffer]. This trait is sealed and cannot be implemented for typ
src/lib.rs
Unsigned (Interface)
(no doc) [1 implementers]
src/lib.rs
Sealed (Interface)
(no doc)
src/lib.rs

Core symbols most depended-on inside this repo

do_bench
called by 7
benches/bench.rs
divmod100
called by 4
src/lib.rs
div_rem_1e16
called by 2
src/lib.rs
mulhi
called by 1
src/u128_ext.rs
format
called by 1
src/lib.rs
bench
called by 0
benches/bench.rs
default
called by 0
src/lib.rs
clone
called by 0
src/lib.rs

Shape

Function 8
Method 5
Interface 3
Class 2
Enum 1

Languages

Rust100%

Modules by API surface

src/lib.rs14 symbols
benches/bench.rs2 symbols
tests/test.rs1 symbols
src/u128_ext.rs1 symbols
fuzz/fuzz_targets/fuzz_itoa.rs1 symbols

For agents

$ claude mcp add itoa \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact