Description
The functx:contains-case-insensitive function returns true if $substring is contained in $arg. It is case insensitive; it matches a word even if the case is different.
Arguments and Return Type| Name | Type | Description |
$arg |
xs:string? |
the string to search |
$substring |
xs:string |
the substring to find |
| return value |
xs:boolean? |
XQuery Function Declaration| See XSLT definition. | | XQuery Syntax for July 2004 - January 2007 (1.0): |
|---|
declare namespace functx = "http://www.functx.com";
declare function functx:contains-case-insensitive
( $arg as xs:string? ,
$substring as xs:string ) as xs:boolean? {
contains(upper-case($arg), upper-case($substring))
} ; | | XQuery Syntax for May 2003: |
|---|
declare namespace functx = "http://www.functx.com"
define function contains-case-insensitive
( $arg as xs:string? ,
$substring as xs:string ) as xs:boolean? {
fn:contains(fn:upper-case($arg), fn:upper-case($substring))
} |
Examples| XQuery Example | Results |
|---|
functx:contains-case-insensitive(
'abcdef', 'def')
|
true
|
functx:contains-case-insensitive(
'abcdEF', 'def')
|
true
|
See AlsoHistory |
|