Function

AppStreamspdx_license_tokenize

since: 0.9.8

Declaration [src]

gchar**
as_spdx_license_tokenize (
  const gchar* license
)

Description [src]

Tokenizes the SPDX license string (or any simarly formatted string) into parts. Any license parts of the string e.g. “LGPL-2.0+” are prefexed with “@”, the conjunctive replaced with “&”, the disjunctive replaced with “|” and the WITH operator for license exceptions replaced with “^”. Brackets are added as indervidual tokens and other strings are appended into single tokens where possible.

Available since: 0.9.8

Parameters

license

Type: const gchar*

A license string, e.g. “LGPLv2+ and (QPL or GPLv2) and MIT”.

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

Return value

Type: An array of utf8

Array of strings, or NULL for invalid.

The array is NULL-terminated.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
Each element is a NUL terminated UTF-8 string.