@yookue/ts-lang-utils
    Preparing search index...

    Function split

    • Returns the split array of the given string by the given delimiter

      Parameters

      • Optionaltext: null | string

        the source string to inspect

      • delimiter: string = ','

        the delimiter to split strings, default is comma

      • max: number = -1

        the max elements expected, negative means unlimited, default is -1

      • trim: boolean = true

        whether trim each element before returning, default is true

      • skipEmpties: boolean = true

        whether skip all empty elements, default is true

      Returns undefined | string[]

      the split array of the given string by the given delimiter

      David Hsing

      split('foo,bar');    // ['foo', 'bar']
      split('hello | world | wonderful', '|', 2); // ['hello', 'world']