diff --git a/src/utils/string.ts b/src/utils/string.ts index 9ac0f05..14eee83 100644 --- a/src/utils/string.ts +++ b/src/utils/string.ts @@ -1,5 +1,5 @@ /** - * Function will replace the middle of the string with 3 dots if length greater then + * Function will replace the middle of the string with ellipsis if length greater then * offset value * @param str string to shorten * @param offset of how many chars to keep in the beginning and the end @@ -9,10 +9,7 @@ export const shorten = (str: string, offset = 9) => { // return original string if it is not long enough if (str.length < offset * 2 + 4) return str - return `${str.slice(0, offset)}...${str.slice( - str.length - offset, - str.length - )}` + return `${str.slice(0, offset)}…${str.slice(str.length - offset, str.length)}` } export const stringToHex = (str: string) => {