site/node_modules/ccount/index.d.ts
2024-10-14 08:09:33 +02:00

12 lines
339 B
TypeScript

/**
* Count how often a character (or substring) is used in a string.
*
* @param {string} value
* Value to search in.
* @param {string} character
* Character (or substring) to look for.
* @return {number}
* Number of times `character` occurred in `value`.
*/
export function ccount(value: string, character: string): number