Function

GimpUnitformat_string

Declaration [src]

gchar*
gimp_unit_format_string (
  const gchar* format,
  GimpUnit unit
)

Description [src]

The format string supports the following percent expansions:

% f Factor (how many units make up an inch) % y Symbol (e.g. “”” for GIMP_UNIT_INCH) % a Abbreviation % s Singular % p Plural %% Literal percent

Available since:2.8

Parameters

format const gchar*
 

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

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
unit GimpUnit
 

A unit.

Return value

Returns: gchar*
 

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

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The value is a NUL terminated UTF-8 string.