Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/string/index.js>count

A JavaScript extension package for building strong and modern applications.
Latest
function count
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

import { count } from "@ayonli/jsext/string";

console.log(count("hello world", "o")); // 2
console.log(count("hello world", "i")); // 0