filename - Return the filename.
filename (ext:bool, "file", …)
This function returns the filename portion of a file. It remove the direction and extention.
If ext is true, filename will return the extention of the file.
You can have multiple ext parameter as in:
filename(file1, ext:true, file2, ext:false, file3);
If multiple files are passed, the function return an array.
If only one file is passed, the function return a string.
The parameter ext is valid from version 5.123.
Note: In the followings examples, the _ between the { should be removed to make it work.
res={_{ filename('a','b.txt', "/a/c.txt", "/a/d", "aa", "bb.png", "/aa/cc.txt", "/aa/dd", "/a/.ext"); }_}. return res=["a","b","c","d","aa","bb","cc","dd",""].
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com