codepoint-equal

Whether two strings have the same Unicode code points

Description

The fn:codepoint-equal function determines whether the two string arguments have the same Unicode code points, in the same order. This is similar to calling the fn:compare function with the simple collation http://www.w3.org/2005/xpath-functions/collation/codepoint.

Parameters

Description

comparand1:string()

the first string to compare

comparand2:string()

the second string to compare

Examples

XPath

Results

codepoint-equal(‘abc’, ‘abc’)

true

codepoint-equal(‘abc’, ‘ab c’)

false

codepoint-equal(‘abc’, ())

()

See Also