@tempots/std
countStringOccurrences() function
Return the number of occurrences of test
in s
.
Signature:
countStringOccurrences: (s: string, test: string) => number
Parameters
Parameter |
Type |
Description |
---|---|---|
s |
string |
The string to search in. |
test |
string |
The string to search for. |
Returns: number
The number of occurrences of test
in s
.