ichigyou
    Preparing search index...

    Function countOccurrences

    • Counts the occurrences of a target character in a given string.

      Parameters

      • str: string

        The input string.

      • targetChar: string

        The character to count occurrences of.

      Returns number

      The number of occurrences of targetChar in str.