kaven-basic - v6.0.0
    Preparing search index...

    Function CharactersCount

    • Counts the number of occurrences of the specified characters in a given string.

      Parameters

      • str: string

        The string to search within.

      • ...characters: string[]

        The characters to count occurrences of. Accepts one or more characters as separate arguments.

      Returns number

      The total count of occurrences of the specified characters in the input string.

      • Each character in characters is considered only once, even if repeated in the arguments.
      • If str is empty, the function returns 0.

      4.0.0

      2025-07-09