@technobuddha > library > String > Operations
Function: count()
ts
function count(
input: string,
substring: string,
options: CountOptions): number;Defined in: count.ts:20
Compute the number of times a substring occurs within a string
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string |
substring | string | The substring to look for |
options | CountOptions | see CountOptions |
Returns
number
number of times substring occurs within input