29 releases (11 stable)

1.0.10 Dec 9, 2023
1.0.9 Jul 15, 2023
1.0.6 Mar 3, 2023
1.0.5 Dec 17, 2022
0.1.1 Jun 25, 2016

#5 in Value formatting

Download history 2426252/week @ 2023-11-26 2421994/week @ 2023-12-03 2696597/week @ 2023-12-10 2280941/week @ 2023-12-17 1475502/week @ 2023-12-24 2086001/week @ 2023-12-31 2513327/week @ 2024-01-07 2525659/week @ 2024-01-14 2501027/week @ 2024-01-21 2708454/week @ 2024-01-28 2632318/week @ 2024-02-04 2609803/week @ 2024-02-11 2649810/week @ 2024-02-18 2771594/week @ 2024-02-25 2743360/week @ 2024-03-03 1035992/week @ 2024-03-10

9,385,383 downloads per month
Used in 48,519 crates (249 directly)

MIT/Apache

17KB
221 lines

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 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

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.

Dependencies

~115KB