Returns the substring before the first 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 first occurrence of the given separator
substringBefore("foo/bar/foo/bar", "/"); // 'foo' Copy
substringBefore("foo/bar/foo/bar", "/"); // 'foo'
Returns the substring before the first occurrence of the given separator (the separator is not returned)