Returns the last segment of a path, or '' if root
The input path
The last segment, or '' if input is root
leaf('foo/bar/baz') // returns 'baz'leaf('c:/') // returns '' Copy
leaf('foo/bar/baz') // returns 'baz'leaf('c:/') // returns ''
Returns the last segment of a path, or '' if root