Function

GLib-2.0GLibvariant_is_object_pathSince 2.24

  • Determines if a given string is a valid D-Bus object path. You should ensure that a string is a valid D-Bus object path before passing it to g_variant_new_object_path().

    A valid object path starts with / followed by zero or more sequences of characters separated by / characters. Each sequence must contain only the characters [A-Z][a-z][0-9]_. No sequence (including the one following the final / character) may be empty.

    Parameters

    • string: string

      a normal C nul-terminated string

    Returns boolean

    true if string is a D-Bus object path

    2.24