Name

ends-with — Returns true if the first argument string ends with the second argument string, and otherwise returns false.

Synopsis

boolean ends-with ( strg string ,
suffix string );

Description

For two given strings, this function checks if the first string ends with characters of second string. If any argument is not a string, it is converted to string using rules from string() XPATH function. Thus if the second argument has no string value, the function returns true, because it will be converted to an empty string first.

Unlike start-with() XPATH function, this function is not described in XPATH 1.0 standard. To write portable XPATH expression, use substring().

Parameters

strg

String whose first characters must be compared

prefix

String whose characters must be compared with first characters of strg

Return Types

Boolean

Examples

Example24.584.

ends-with('OpenLink Virtuoso', 'Virtuoso')