function formatInteger(value, picture) {
        if (typeof value === 'undefined') {
            return undefined;
        }

        value = Math.floor(value);

        const format = analyseIntegerPicture(picture);
        return _formatInteger(value, format);
    }
Formats an integer as specified by the XPath fn:format-integer function
See https://www.w3.org/TR/xpath-functions-31/#func-format-integer
@param {number} value - the number to be formatted
@param {string} picture - the picture string that specifies the format
@returns {string} - the formatted number