Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kk-83bff226.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Signature

path=null start=null
countOccurrences(str: string, targetChar: string): number

Parameters

  • str: string - The input string.
  • targetChar: string - The character to count occurrences of.

Returns

number - The number of occurrences of targetChar in str.

Source

Defined in string.ts:123