@modern-kit/utils
Version:
15 lines (13 loc) • 576 B
TypeScript
/**
* @description 주어진 문자열에서 연속된 문자의 개수가 maxCount를 초과하는지 확인하는 함수입니다.
*
* @param {string} string - 확인할 문자열
* @param {number} maxCount - 연속된 문자의 최대 개수
* @returns {boolean} 연속된 문자의 개수가 maxCount를 초과하는지 여부
*
* @example
* containsConsecutiveCharacters('aaabbb', 3); // true
* containsConsecutiveCharacters('aaabbb', 2); // false
*/
declare function hasRepeatingChars(string: string, maxCount: number): boolean;
export { hasRepeatingChars };