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

    Function substringBeforeLastAny

    • Returns the substring before the last 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 last occurrence of any the given separators

      David Hsing

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