Description
The functx:contains-any-of function performs the fn:contains function on a sequence of strings, returning true if $arg contains any one of the values in $searchStrings.
Arguments and Return Type| Name | Type | Description |
$arg |
xs:string? |
the string to test |
$searchStrings |
xs:string* |
the strings to look for |
| return value |
xs:boolean |
XQuery Function Declaration| See XSLT definition. | declare namespace functx = "http://www.functx.com";
declare function functx:contains-any-of
( $arg as xs:string? ,
$searchStrings as xs:string* ) as xs:boolean {
some $searchString in $searchStrings
satisfies contains($arg,$searchString)
} ; |
Examples| XQuery Example | Results |
|---|
functx:contains-any-of('abc',('bc','xy')) |
true |
functx:contains-any-of('abc',('de','xy')) |
false |
See AlsoHistory |
Recommended Reading: 
|