### Function

# AppStream license_to_spdx_id

since: 0.9.8

#### Declaration [src]

    gchar*
    as_license_to_spdx_id (
      const gchar* license
    )

#### Description [src]

Converts a non-SPDX license into an SPDX format string where possible.

Available since: 0.9.8

#### Parameters

`license`

  Type: `const gchar*`

  A not-quite SPDX license string, e.g. “GPLv3+”.

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

#### Return value

Type: `gchar*`

The best-effort SPDX license string.

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.