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 TypeName | Type | Description |
$arg |
xs:string? |
the string to test |
$searchStrings |
xs:string* |
the strings to look for |
return value |
xs:boolean |
XQuery Function DeclarationSee 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)
} ; |
ExamplesXQuery Example | Results |
---|
functx:contains-any-of('abc',('bc','xy')) |
true |
functx:contains-any-of('abc',('de','xy')) |
false |
See AlsoHistory |
Recommended Reading:
|