4 releases (2 breaking)

0.2.1 Apr 26, 2021
0.2.0 Apr 26, 2021
0.1.0 Apr 19, 2021
0.0.0 Apr 19, 2021

#30 in #repeat

Download history 23/week @ 2026-01-24 26/week @ 2026-01-31 17/week @ 2026-02-07 20/week @ 2026-02-14 68/week @ 2026-02-21 255/week @ 2026-02-28 318/week @ 2026-03-07 494/week @ 2026-03-14 654/week @ 2026-03-21 525/week @ 2026-03-28 335/week @ 2026-04-04 81/week @ 2026-04-11 66/week @ 2026-04-18 117/week @ 2026-04-25 83/week @ 2026-05-02 877/week @ 2026-05-09

1,150 downloads per month
Used in 2 crates

MIT license

7KB
106 lines

Print all items from an iterator.

Example: Print all items from an array slice

use fmt_iter::FmtIter;
println!("{}", FmtIter::from(&[0, 12, 345]));

Expected Output:

012345

Example: Repeat a certain character multiple times

use fmt_iter::repeat;
println!("{}", repeat('x', 5));

Expected Output:

xxxxx

fmt-iter

Test Crates.io Version

Print all items from an iterator.

Usage Examples

Print all items from an array slice

use fmt_iter::FmtIter;
println!("{}", FmtIter::from(&[0, 12, 345]));

Expected Output:

012345

Repeat a certain character multiple times

use fmt_iter::repeat;
println!("{}", repeat('x', 5));

Expected Output:

xxxxx

License

MIT © Hoàng Văn Khải.

Dependencies

~0.6–1MB
~20K SLoC