NexJ Logo

Contains()

Compares two specified strings of text to determine if the second string is contained within the first string. This function takes two string values as arguments and returns a Boolean value. If the second string is found within the first string, this function returns the Boolean value TRUE, otherwise it returns the Boolean value FALSE.

Syntax

Contains(source_<text>, <text_to_find>)

Input

source_text

string

The text to search within.

text_to_find

string

The text to find within the source text.

Output

Boolean

Examples

  • The expression Contains("The quick brown fox", "quick") returns TRUE.
  • The expression Contains("The quick brown fox", "dog") returns FALSE.