No. I disagree.
Code: Select all
console::write("Processing Dir ",CurrentDir),console::nl(),
CurrentFilename = directory::getFilesInDirectoryAndSub_nd(CurrentDir,CurrentSearchExtension),
%console::write("Found Filename ",CurrentFilename),console::nl(),
CurrentExtension = filename::getExtension(CurrentFilename),
CurrentPath = filename::getPath(CurrentFilename),
CurrentName = filename::getname(CurrentFilename),
CurrentNameUpper = string::toUpperCase(CurrentName),
%CurrentNameUpper = toUpperCase(CurrentName),
NameList00 = split(CurrentNameUpper," .-()_#"),
NameList = list::removeAll(NameList00,""),
PathList = split(CurrentPath,"\\"),
[Head|ReversePathList] = list::reverse(PathList), % EXAMPLE 1
[Next|Rest] = ReversePathList,
CurrentPathUpper = string::toUpperCase(CurrentPath),
PathNameList = split(string::toUpperCase(Next)," .-()_#"),
This is an actual working fragment of code that is dealing with lists of strings.
If you look at the line with EXAMPLE 1 as a comment. Head will contain a string and ReversePathList contains the list of remaining elements
So if I debug and halt my code in the second assert_filename line.
PathList = ["i:","usr","movies","Movies 1-99",""]
Head = ""
ReversePathList = ["Movies 1-99","movies","usr","i:"]
So it does seem to work as I expect.