- https://www.w3.org/TR/xpath-functions-30
- https://www.w3.org/TR/xpath-functions-30/#formatting-integers
- https://www.w3.org/TR/xpath-functions-30/#formatting-the-number
- http://www.xqueryfunctions.com/xq/functx_pad-integer-to-length.html
- http://www.xqueryfunctions.com/xq/functx_pad-string-to-length.html
- https://github.com/JochenHayek/misc/blob/master/xqueryfunctions
- https://github.com/JochenHayek/misc/blob/master/xqueryfunctions/pad-string-to-length-on-the-left.xqy
I need to pad a decimal number to a given length with leading white space. Looks like there is nothing in the “built-in library”. Looks like there is no functx:pad-integer-to-length as well, but functx:pad-string-to-length looks intriguing – but it only pads on the right. I created a variant, that pads on the left: pad-string-to-length-on-the-left.xqy
– pls follow the link shown above!