Skip to content

Runtime string formatting for Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

SpaceManiac/runtime-fmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

runtime-fmt

A crate for string formatting using runtime format strings.

This crate provides much the same facilities as std::fmt, with the additional allowance for format strings which are not known until runtime. Possible applications include internationalization, scripting, or other customization.

Each of the standard formatting macros format_args!, format!, print!, println!, write!, and writeln! have corresponding rt_ variants. Calls which previously succeeded unconditionally now return Result, which may indicate a bad format string or arguments.

The syntax for format strings and for macro invocations is equivalent to that used by std::fmt, including support for positional and named arguments. This crate shells out to the standard library implementations for as much as possible to ensure feature parity.

This crate makes extensive use of the unstable formatting machinery and therefore requires nightly.

About

Runtime string formatting for Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages