12 lines
339 B
TypeScript
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
|