siFormatWrapper

Convenience function that returns a SIFormatter when the format string is known at compile-time.

siFormatWrapper
(
string fmt
)
()

Examples

import std.string;

auto sf = siFormatWrapper!"%.1f km/h";
auto speed = 343.4 * meter/second;
assert("Speed: %s".format(sf(speed)) == "Speed: 1236.2 km/h");

Meta