Description
The functx:right-trim function removes all whitespace at the end of $arg . Whitespace is defined as it is in XML, namely space, tab, carriage return and line feed. If $arg is the empty sequence, it returns a zero-length string.
Arguments and Return TypeName | Type | Description |
$arg |
xs:string? |
the string to trim |
return value |
xs:string |
XSLT Function DeclarationSee XQuery definition. | <xsl:function name="functx:right-trim" as="xs:string"
xmlns:functx="http://www.functx.com">
<xsl:param name="arg" as="xs:string?"/>
<xsl:sequence select="
replace($arg,'\s+$','')
"/>
</xsl:function>
|
ExamplesXPath Example | Results |
---|
functx:right-trim('xyz ') |
xyz |
functx:right-trim(' x xyz ') |
x xyz |
functx:right-trim('xyz') |
xyz |
See AlsoHistory |
Recommended Reading:
|