GLib.Variant.is_signature

function is_signature(string: String): Boolean {
    // Gjs wrapper for g_variant_is_signature()
}
  

Determines if a given string is a valid D-Bus type signature. You should ensure that a string is a valid D-Bus type signature before passing it to GLib.Variant.new_signature.

D-Bus type signatures consist of zero or more definite GLib.VariantType strings in sequence.

Since 2.24

string

a normal C nul-terminated string

Returns

true if string is a D-Bus type signature