How do I remove a new-line/return from the end of a variable? I tried functx:substring-before-last to try and remove the new line (denoting it as \r, \n and also as \r\n) but still when I output that variable’s value, the newline is still there in it.
How do I remove a new-line/return from the end of a variable? I tried
Share
You can either use
fn:normalize-space($arg as xs:string?)to remove all additional whitespace:Or you can just use
fn:replace(..)and a regular expression: