Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

StrContains

Use this function to verify if the search string exists within a specific string. A result value of 1 is returned if the search string exists; a value of 0 is returned if the search string does not exist.

Note: If you create a variable to store the return value for this function, you must create the variable with the NUM type.

Copy

Syntax

STRCONTAINS ("String","SearchString")        

where:

  • String is a character string (enclosed in double quotation marks).
  • SearchString is a character string (enclosed in double quotation marks), which will be searched for inside String.
Copy

Syntax example

CREATE VARIABLE NumTemp1 AS NUMSET VARIABLE NumTemp1 = STRCONTAINS ("StringTest","Test")

//NumTemp1 will equal 1        

Published:

StrContains

Use this function to verify if the search string exists within a specific string. A result value of 1 is returned if the search string exists; a value of 0 is returned if the search string does not exist.

Note: If you create a variable to store the return value for this function, you must create the variable with the NUM type.

Copy

Syntax

STRCONTAINS ("String","SearchString")        

where:

  • String is a character string (enclosed in double quotation marks).
  • SearchString is a character string (enclosed in double quotation marks), which will be searched for inside String.
Copy

Syntax example

CREATE VARIABLE NumTemp1 AS NUMSET VARIABLE NumTemp1 = STRCONTAINS ("StringTest","Test")

//NumTemp1 will equal 1        

For an optimal Community experience, Please view on Desktop