#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

#347 in No standard library

Download history 91/week @ 2024-03-11 128/week @ 2024-03-18 55/week @ 2024-03-25 80/week @ 2024-04-01 56/week @ 2024-04-08 64/week @ 2024-04-15 68/week @ 2024-04-22 40/week @ 2024-04-29 34/week @ 2024-05-06 40/week @ 2024-05-13 24/week @ 2024-05-20 32/week @ 2024-05-27 32/week @ 2024-06-03 25/week @ 2024-06-10 36/week @ 2024-06-17 35/week @ 2024-06-24

131 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.2MB
~27K SLoC