strcmp

Table of Contents

Prototype: strcmp(string1, string2)

Return type: boolean

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

Arguments:

  • string1: string, in the range: .*
  • string2: string, in the range: .*

Example:

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:

R: Strings are equal

See Also: regcmp(), regline()