Returns the substring before the last occurrence of the given separator (the separator is not returned)
Optional
the string to get a substring from
the String to search for
the substring before the last occurrence of the given separator
substringBeforeLast("foo/bar/foo/bar", "/"); // 'foo/bar/foo' Copy
substringBeforeLast("foo/bar/foo/bar", "/"); // 'foo/bar/foo'
Returns the substring before the last occurrence of the given separator (the separator is not returned)