static _truncateDecimalPlaces(value, settings, isPaste, decimalPlacesToRoundTo) {
        if (isPaste) {
            value = this._roundFormattedValueShownOnFocus(value, settings);
        }

        const [integerPart, decimalPart] = value.split(settings.decimalCharacter);

        // Truncate the decimal part to the satisfying length since we would round it anyway
        if (decimalPart && decimalPart.length > decimalPlacesToRoundTo) {
            if (decimalPlacesToRoundTo > 0) {
                const modifiedDecimalPart = decimalPart.substring(0, decimalPlacesToRoundTo);
                value = `${integerPart}${settings.decimalCharacter}${modifiedDecimalPart}`;
            } else {
                value = integerPart;
            }
        }

        return value;
    }
Truncates the decimal part of a number to the given number of decimal places `decimalPlacesToRoundTo`.

@param {string} value
@param {object} settings
@param {boolean} isPaste
@param {int} decimalPlacesToRoundTo
@returns {*}