Loading TOC...

fn:codepoint-equal

fn:codepoint-equal(
   $comparand1 as xs:string?,
   $comparand2 as xs:string?
) as xs:boolean?

Summary

Returns true if the specified parameters are the same Unicode code point, otherwise returns false. The codepoints are compared according to the Unicode code point collation (http://www.w3.org/2005/xpath-functions/collation/codepoint).

If either argument is the empty sequence, the result is the empty sequence.

Parameters
$comparand1 A string to be compared.
$comparand2 A string to be compared.

Example

let $cp := fn:string-to-codepoints("123456")
return
fn:codepoint-equal("123456", fn:codepoints-to-string($cp) )

=> true

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.