#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

#338 in No standard library

Download history 20/week @ 2023-12-11 31/week @ 2023-12-18 10/week @ 2023-12-25 14/week @ 2024-01-01 63/week @ 2024-01-08 23/week @ 2024-01-15 45/week @ 2024-01-22 17/week @ 2024-01-29 131/week @ 2024-02-05 73/week @ 2024-02-12 88/week @ 2024-02-19 76/week @ 2024-02-26 76/week @ 2024-03-04 91/week @ 2024-03-11 128/week @ 2024-03-18 73/week @ 2024-03-25

371 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

~2MB
~43K SLoC