#iterator #repeat #display

no-std fmt-iter

Print all items from an iterator

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

#424 in No standard library

Download history 29/week @ 2024-11-13 85/week @ 2024-11-20 118/week @ 2024-11-27 60/week @ 2024-12-04 59/week @ 2024-12-11 34/week @ 2024-12-18 12/week @ 2024-12-25 109/week @ 2025-01-01 96/week @ 2025-01-08 262/week @ 2025-01-15 3953/week @ 2025-01-22 64/week @ 2025-01-29 89/week @ 2025-02-05 80/week @ 2025-02-12 130/week @ 2025-02-19 110/week @ 2025-02-26

421 downloads per month
Used in 2 crates

MIT license

7KB
106 lines

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.


lib.rs:

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

Dependencies

~0.7–1.1MB
~24K SLoC