Function splitIncludeSplit

  • Same as * ''.split but includes the split delimiter in the output array.

    Parameters

    • original: string
    • splitDelimiter: string | RegExp
    • __namedParameters: {
          caseSensitive: boolean;
      }
      • caseSensitive: boolean

    Returns readonly string[]

    import {splitIncludeSplit} from '@augment-vir/common';

    splitIncludeSplit('1,2,3', ',', {caseSensitive: false}); // outputs `['1', ',', '2', ',', '3']`