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

    Function substringBefore

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

      Parameters

      • Optionaltext: string | null

        The string to get a substring from

      • Optionalseparator: string | null

        The string to search for

      Returns string | null | undefined

      the substring before the first occurrence of the given separator

      David Hsing

      substringBefore("foo/bar/foo/bar", "/");    // 'foo'