I think this is a badly-chosen name. Both POSIX and Python have a
basename function which does roughly what our leaf() function does.
Python:
>>> import os.path
>>> help(os.path.basename)
Help on function basename:
basename(p)
Returns the final component of a pathname
>>> os.path.basename('foo/bar.baz')
'bar.baz'
POSIX:
$ info basename
`basename': Strip directory and suffix from a file name
=======================================================
`basename' removes any leading directory components from NAME.
Synopsis:
basename NAME [SUFFIX]
If SUFFIX is specified and is identical to the end of NAME, it is
removed from NAME as well. `basename' prints the result on standard
output.
$ basename 'foo/bar.baz'
bar.baz
$ basename 'foo/bar.baz' .baz
bar
I don't think we should use creative naming in cases like this one.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost