5 releases (3 breaking)

Uses old Rust 2015

0.4.1 Oct 5, 2019
0.4.0 Aug 25, 2019
0.3.0 Jul 22, 2017
0.2.0 May 16, 2017
0.1.0 Apr 6, 2017

#157 in Internationalization (i18n)

Download history 9/week @ 2024-01-06 10/week @ 2024-01-13 9/week @ 2024-01-20 5/week @ 2024-01-27 8/week @ 2024-02-03 18/week @ 2024-02-10 21/week @ 2024-02-17 32/week @ 2024-02-24 36/week @ 2024-03-02 66/week @ 2024-03-09 39/week @ 2024-03-16 26/week @ 2024-03-23 55/week @ 2024-03-30 28/week @ 2024-04-06 36/week @ 2024-04-13 20/week @ 2024-04-20

140 downloads per month
Used in 7 crates (3 directly)

MIT/Apache

57KB
1K SLoC

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.

Dependencies

~57KB