@fivem-ts/shared
Version:
FiveM Typescript wrapper shared part
16 lines (15 loc) • 508 B
TypeScript
/**
* Counts the occurrences of a substring within a string.
*
* @example
* ```ts
* const result = countSubstringOccurrences("hello hello world", "hello");
* console.log(result); // 2
* ```
*
* @param {string} input - The string to search within.
* @param {string} substring - The substring to count occurrences of.
*
* @return {number} The number of times the substring occurs in the input string.
*/
export declare function countSubstringOccurrences(input: string, substring: string): number;