Description
The functx:index-of-string-last function returns an integer representing the last position of $substring within $arg. If $arg does not contain $substring, the empty sequence is returned.
Arguments and Return Type| Name | Type | Description |
$arg |
xs:string? |
the string |
$substring |
xs:string |
the substring to find |
| return value |
xs:integer? |
XSLT Function Declaration| See XQuery definition. | | XSLT 2.0 Syntax: |
|---|
<xsl:function name="functx:index-of-string-last" as="xs:integer?"
xmlns:functx="http://www.functx.com" >
<xsl:param name="arg" as="xs:string?"/>
<xsl:param name="substring" as="xs:string"/>
<xsl:sequence select="
functx:index-of-string($arg, $substring)[last()]
"/>
</xsl:function>
|
Examples| XSLT Example | Results |
|---|
functx:index-of-string-last(
'abcdabcdabcd','abc')
|
9
|
functx:index-of-string-last(
'abcd','abc')
|
1
|
functx:index-of-string-last(
'xxx','abc')
|
()
|
Depends OnSee AlsoHistory |
|