UNPKG

@utilify/core

Version:

Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B

9 lines 404 B
/** * Counts the occurrences of a character in a string. * @param {string} str - The string to search. * @param {string} char - The character to count. * @returns {number} The number of occurrences. * @throws {TypeError} If str is not a string or char is not a single character string. */ export default function charCount(str: string, char: string): number; //# sourceMappingURL=charCount.d.ts.map