import {isNormalCharacter} from '@shared/utils';

export const getSpecialCharsLength = (
  str: string,
  position: number,
): number => {
  for (let i = position; i < str.length; i++) {
    if (isNormalCharacter(str, i)) {
      return i - position;
    }
  }
  return str.length - position;
};
