Gio.Application.id_is_valid
function id_is_valid(application_id: String): Boolean { // Gjs wrapper for g_application_id_is_valid() }
Checks if application_id is a valid application identifier.
A valid ID is required for calls to Gio.Application.new and Gio.Application.prototype.set_application_id.
For convenience, the restrictions on application identifiers are reproduced here:
- Application identifiers must contain only the ASCII characters "[A-Z][a-z][0-9]_-." and must not begin with a digit.
- Application identifiers must contain at least one '.' (period) character (and thus at least three elements).
- Application identifiers must not begin or end with a '.' (period) character.
- Application identifiers must not contain consecutive '.' (period) characters.
- Application identifiers must not exceed 255 characters.
- application_id
a potential application identifier
- Returns
true if application_id is valid