Loading TOC...

fn.contains

fn.contains(
   $parameter1 as String?,
   $parameter2 as String?,
   [$collation as String]
) as Boolean

Summary

Returns true if the first parameter contains the string from the second parameter, otherwise returns false.

Parameters
$parameter1 The string from which to test.
$parameter2 The string to test for existence in the first parameter.
$collation The optional name of a valid collation URI. For information on the collation URI syntax, see the Search Developer's Guide.

Example

fn.contains("this is a string", "s a s");

=> true

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.