[Index for tmp_for_tar/misc]
[Return to Master Index]
filename_nopath
(tmp_for_tar/misc/filename_nopath.m)
Function Synopsis
p = filename_nopath( fname )
Help text
p = filename_nopath( fname )
Returns the last component of fname -- whatever is after the last slash.
Returns fname if fname contains no slash.
Derived from Andy Adler's imread.m.
Last modified: April 2001
Listing of function file tmp_for_tar/misc/filename_nopath.m
## p = filename_nopath( fname )
##
## Returns the last component of fname -- whatever is after the last slash.
##
## Returns fname if fname contains no slash.
##
## Derived from Andy Adler's imread.m.
##
## Author: Etienne Grossmann <etienne@isr.ist.utl.pt>
## Last modified: April 2001
function p = filename_nopath( fname )
p = fname ;
if nargin < 1, return ; end
s = max (find (fname=="/"));
if ! isempty(s),
p = fname(s+1:length(fname));
end
Produced by oct2html on Sat Apr 28 21:14:54 2001
Cross-Directory links are: ON