import { count } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/string/index.js";
Counts the occurrence of the sub-string in the string.
Examples
Example 1
Example 1
import { count } from "@ayonli/jsext/string";
console.log(count("hello world", "o")); // 2
console.log(count("hello world", "i")); // 0