functx:contains-case-insensitive

Whether one string contains another, without regard to case

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.

Parameters

Description

arg:string()

the string to search

substring:string()

the substring to find

Examples

XPath

Results

functx:contains-case-insensitive('abcdef', 'def')

true

functx:contains-case-insensitive('abcdEF', 'def')

true

In a generator

Copy the snippet below and paste it in Freemapper, under a language node inside the generators element. Each line of the pattern prints the result of one example; to see them, run mi generate <project> <language> example-functx-contains-case-insensitive.

[e] example-functx-contains-case-insensitive
    [e] start
        [e] match
            [v] /
        [e] body
            [e] write-pattern
                [v] examples
    [e] patterns
        [e] examples
            [v] E01: {{ functx:contains-case-insensitive('abcdef', 'def') }}
            [v] E02: {{ functx:contains-case-insensitive('abcdEF', 'def') }}

See Also