home contribute faq download

FunctX XQuery Functions

functx:contains-case-insensitive

Whether one string contains another, without regard to case

Google
Webdatypic.com

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

NameTypeDescription
$arg xs:string? the string to search
$substring xs:string the substring to find
return value xs:boolean

XQuery Function Declaration

See XSLT definition.
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))
 } ;

Examples

XQuery ExampleResults
functx:contains-case-insensitive(
   'abcdef', 'def')
true
functx:contains-case-insensitive(
   'abcdEF', 'def')
true

See Also

fn:containsWhether one string contains another

History

Published OnLast UpdatedContributor(s)
2006-06-272007-02-26Priscilla Walmsley, Datypic, pwalmsley@datypic.com, http://www.datypic.com
Datypic XQuery Services

Recommended Reading:

XQuery