You are not logged in.
Pages: 1
Found a bug today. Using D7 and the current git version.
When parsing the string/CSV '-1,25,0' after a call to CSVToRawUTF8DynArray(), the CSV array will have only two elements: ('-1','25). The last element, '0' will be left out.
Code to reproduce:
procedure BugCSVToRawUTF8DynArray;
var
CSV: TRawUTF8DynArray;
begin
CSVToRawUTF8DynArray('-1,25,0', ',', #0, CSV);
Assert(Length(CSV) = 3);
end;
Last edited by Junior/RO (2018-06-08 16:58:38)
Offline
You are wrongly setting #0 as end of line, which does not make any sense (#0 is already an end-of line separator).
The following code works as expected:
CSVToRawUTF8DynArray('-1,25,0',arr);
check(Length(arr)=3);
Check(arr[0]='-1');
Check(arr[1]='25');
Check(arr[2]='0');
Offline
I see now. Thank you.
Offline
Pages: 1