display_utils

Crates.iodisplay_utils
lib.rsdisplay_utils
version0.4.0
sourcesrc
created_at2021-01-09 14:04:46.227982
updated_at2021-03-05 10:07:22.717611
descriptionLightweight and no_std-compatible string formatting utilities
homepage
repositoryhttps://github.com/kangalioo/display-utils/
max_upload_size
id336469
size33,972
kangalio (kangalio)

documentation

README

This no_std compatible library provides several useful constructs to format data in a human-readable fashion with zero allocations.

Why hand-roll annoying and verbose formatting code everywhere...

for i, item in list.iter().enumerate() {
	if i == list.len() - 1 {
		println!("{}", item);
	} else {
		print!("{} - ", item);
	}
}

...when you could just use this?

println!("{}", display_utils::join(list, " - "));

This library makes ingenious use of Rust's formatting abstractions to provide super flexible and powerful formatting utilities, without any allocations.

For more information, please see the documentation: https://docs.rs/display_utils

Commit count: 19

cargo fmt