Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rust micro-crate to create formatted string from format_args!() like alloc::fmt::format() but without allocation

License

Notifications You must be signed in to change notification settings

vzvezda/stackfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

stackfmt

Creates formatted string from format_args!() like alloc::fmt::format() but without allocation:

let mut buf = [0u8; 64];
let formatted: &str = stackfmt::fmt_truncate(&mut buf, format_args!("Hello{}", 42));
assert_eq!(formatted, "Hello42");

Implemented based on this SO answer https://stackoverflow.com/a/50201632/601298

About

Rust micro-crate to create formatted string from format_args!() like alloc::fmt::format() but without allocation

Resources

License

Stars

Watchers

Forks

Languages