title: XQuery: removing newline/return character from end of a string stored in a variable in query
body: <p>How do I remove a new-line/return from the end of a variable? I tried <code>functx:substring-before-last</code> to try and remove the new line (denoting it as <code>\r</code>, <code>\n</code> and also as <code>\r\n</code>) but still when I output that variable's value, the newline is still there in it.</p>