containsIgnoreCase() function | Zoho QEngine Help

containsIgnoreCase()

In a nutshell
The containsIgnoreCase() function takes a string and a search string as arguments and returns True if the string contains the search string, regardless of letter case. It returns False if the searchString is not found. It is useful in test scripts where you need to verify text content without being sensitive to case differences.

Overview

The containsIgnoreCase() function takes string and searchString as arguments. It returns True if the string contains the searchString. Otherwise, it returns False.

NotesNote: This function performs a case-insensitive search.

Return Type

  • Boolean

Syntax

  1. <variable> = <string>.containsIgnoreCase( <searchString> );

(OR)

  1. <variable> = containsIgnoreCase(<string>, <searchString>);
ParameterDescriptionData type
<variable>Variable which will contain the boolean value, true or false.BOOLEAN
<string>The string which may contain the searchString.TEXT
<searchString>The string to be searched for, in the main string.TEXT

Examples

  1. Product = "Zoho QEngine";
  2. boolVal = Product.containsIgnoreCase("qengine");     // returns true