Function

GLib-2.0GLibstrcmp0Since 2.16

  • Compares str1 and str2 like strcmp().

    Handles NULL gracefully by sorting it before non-NULL strings. Comparing two NULL pointers returns 0.

    Parameters

    • Optionalstr1: string

      a string

    • Optionalstr2: string

      another string

    Returns number

    an integer less than, equal to, or greater than zero, if str1 is <, == or > than str2

    2.16