@technobuddha/library
Version:
A large library of useful functions
15 lines (14 loc) • 482 B
TypeScript
export declare type Options = {
/** if true, counts overlapping strings */
overlap?: boolean;
};
/**
* Compute the number of times a substring occors within a string
*
* @param input The string
* @param supstring The substring to look for
* @param __namedParameters see {@link Options}
* @return number of times *substring* occurs within *input*
*/
export declare function count(input: string, substring: string, { overlap }?: Options): number;
export default count;