Name

contains — Returns true if the first argument string contains the second argument string, and otherwise returns false.

Synopsis

boolean contains ( haystack string ,
needle string );

Description

For two given strings, this function checks if the first string contains the second string. If any argument is not a string, it is converted to string using rules from string() XPATH function. Thus if the second argument has no string value, the function returns true, because it will be converted to an empty string first.

Parameters

haystack

String where the search is performed

needle

String to search

Return Types

Boolean

Examples

Example24.572.

contains ('OpenLink Virtuoso', 'Link')