site/node_modules/ccount/index.d.ts

12 lines
339 B
TypeScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
/**
* 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