@tspro/ts-utils-lib
    Preparing search index...

    Function splitByChars

    • Splits a string by any of the given characters.

      Example:

      splitByChars("a,b;c", ",;"); 
      // ["a", "b", "c"]

      Parameters

      • str: string

        The input string to split.

      • splitters: string

        A string containing one or more characters to split by.

      Returns string[]

      An array of string segments split at any of the given characters.