export const strCnt = (needle, haystack, offset = 0) => {
    let cnt = 0;
    const needleLen = needle.length;
    if (needleLen === 0)
        return 0;
    while (true) {
        const index = haystack.indexOf(needle, offset);
        if (index < 0)
            return cnt;
        cnt++;
        offset = index + needleLen;
    }
};
//# sourceMappingURL=strCnt.js.map