FwupdPlugin.version_compare
Description: Reference for FwupdPlugin.version_compare

### Function

# FwupdPluginversion_compare

#### Declaration [src]

    gint
    fu_version_compare (
      const gchar* version_a,
      const gchar* version_b,
      FwupdVersionFormat fmt
    )

#### Description [src]

Compares version numbers for sorting taking into account the version format if required.

Available since: | 1.8.2

#### Parameters

`version_a` | `const gchar*`
| The semver release version, e.g. `1.2.3`
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`version_b` | `const gchar*`
| The semver release version, e.g. `1.2.3.1`
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`fmt` | `FwupdVersionFormat`
| A version format, e.g. `FWUPD_VERSION_FORMAT_PLAIN`.

#### Return value

Returns: | `gint`
| -1 if a < b, +1 if a > b, 0 if they are equal, and `G_MAXINT` on error.