export const calcStrHash = (str, long = -1) => {
  str = str.replace(/[, _]/g, '')
  const hash = str.split('').reduce((acc, char) => {
    if (char !== ',') {
      return acc + char.charCodeAt(0);
    }
    return acc;
  }, 0)
  str = hash.toString(16).toUpperCase()
  if (long != -1) str = str.padStart(long, '0')
  return str
}
