functx:right-trim
Trims trailing whitespace
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.
Parameters |
Description |
---|---|
arg:string() |
the string to trim |
Examples
XPath |
Results |
---|---|
functx:right-trim(‘xyz ‘) |
xyz |
functx:right-trim(’ x xyz ‘) |
x xyz |
functx:right-trim(‘xyz’) |
xyz |