format_string


Description:

[ Version ( since = "2.8" ) ]
public static string format_string (string format, Unit unit)

The format string supports the following percent expansions:

* `n`: Name (long label) * `a`: Abbreviation (short label) * `%%`: Literal percent * `f`: Factor (how many units make up an inch) * `y`: Symbol (e.g. `''` for `GIMP_UNIT_INCH`)

Parameters:

format

A printf-like format string which is used to create the unit string.

unit

A unit.

Returns:

A newly allocated string with above percent expressions replaced with the resp. strings for unit.