Prototype: strcmp(string1, string2)

Return type: boolean

Description: Returns whether the two strings string1 and string2 match exactly.

Arguments:

  • string1: string - String - in the range: .*
  • string2: string - String - in the range: .*

Example:

code
body common control
{
      bundlesequence => { "example" };
}

bundle agent example
{
  classes:

      "same" expression => strcmp("test","test");

  reports:

    same::

      "Strings are equal";

    !same::

      "Strings are not equal";
}

Output:

code
R: Strings are equal

See also: regcmp(), regline()