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.

Syntax:

STRCONTAINS (SymName|"String",SymName|"SearchString")

STRCONTAINS ("String","SearchString")

where:

  • SymName is the name of a symbol.
  • String is a character string, enclosed in double quotation marks.
  • SearchString is a character string, enclosed in double quotation marks, which is searched for inside String.

Syntax example:

CREATE VARIABLE NumTemp1 AS NUM

SET 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.

Syntax:

STRCONTAINS (SymName|"String",SymName|"SearchString")

STRCONTAINS ("String","SearchString")

where:

  • SymName is the name of a symbol.
  • String is a character string, enclosed in double quotation marks.
  • SearchString is a character string, enclosed in double quotation marks, which is searched for inside String.

Syntax example:

CREATE VARIABLE NumTemp1 AS NUM

SET VARIABLE NumTemp1 = STRCONTAINS ("StringTest","Test")

NumTemp1 will equal 1

For an optimal Community experience, Please view on Desktop