Function

AppStreamvercmp

since: 1.0

Declaration [src]

gint
as_vercmp (
  const gchar* a,
  const gchar* b,
  AsVercmpFlags flags
)

Description [src]

Compare alpha and numeric segments of two software versions, considering flags.

Available since: 1.0

Parameters

a

Type: const gchar*

First version number.

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

Type: const gchar*

Second version number.

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

Type: AsVercmpFlags

Flags, e.g. AS_VERCMP_FLAG_NONE.

Return value

Type: gint

0 if a is newer than b; 0 if a and b are the same version; <<0 if b is newer than a.