[Pas2js] ExtractFileName function
warleyalex
warleyalex at yahoo.com.br
Wed Jul 31 17:33:32 CEST 2019
There are an issue on the ExtractFileName function | win64 platform
...an workaround would be:
function ExtractFileName(str: String): String;
begin
asm
Result = str.split('\\').pop().split('/').pop();
end;
end;
function ExtractFileNameWithoutExt(str: String): String;
begin
asm
Result = str.split('\\').pop().split('/').pop().split('.')[0];
end;
end;
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list