#repeat #iterator #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

#417 in No standard library

Download history 95/week @ 2024-07-22 76/week @ 2024-07-29 47/week @ 2024-08-05 47/week @ 2024-08-12 38/week @ 2024-08-19 77/week @ 2024-08-26 48/week @ 2024-09-02 33/week @ 2024-09-09 16/week @ 2024-09-16 60/week @ 2024-09-23 37/week @ 2024-09-30 21/week @ 2024-10-07 28/week @ 2024-10-14 39/week @ 2024-10-21 132/week @ 2024-10-28 51/week @ 2024-11-04

251 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
~25K SLoC