export var truncate = function (truncateString, maxLength, separator) {
    if (separator === void 0) { separator = '...'; }
    if (truncateString.length <= maxLength) {
        return truncateString;
    }
    var separatorLength = separator.length;
    var charsCountToShow = maxLength - separatorLength;
    var frontCharsCount = Math.ceil(charsCountToShow / 2);
    var backCharsCount = Math.floor(charsCountToShow / 2);
    return "".concat(truncateString.substr(0, frontCharsCount)).concat(separator).concat(truncateString.substr(truncateString.length - backCharsCount));
};
//# sourceMappingURL=stringUtils.js.map