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

    Function substringBeforeAny

    • Returns the substring before the first occurrence of any the given separators (the separator is not returned)

      Parameters

      • Optionaltext: null | string

        the string to get a substring from

      • Optionalseparators: (undefined | null | string)[]

        the strings to search for

      Returns undefined | null | string

      the substring before the first occurrence of any the given separators

      David Hsing

      substringBeforeAny("foo/bar/foo/bar", ["/", ";"]);    // 'foo'