07-22-2006, 09:49 AM
Member function str.GetFileExt
function [$pathname]
;Gets filename extension.
;pathname - file name with or without path. Default: itself.
;EXAMPLE
;str s
;s.GetFileExt("c:\aaa\fff.eee")
;out s
if(!pathname) pathname=this
int i=findcr(pathname '\')+1
int j=findcr(pathname '.')+1
if(j>i) this.get(pathname j); this.trim("''")
else this=""