I am converting code from Lazarus to Delphi 10.4 Sydney and have a line that throws an error:
// Split line and put it into a new array, txtDataArray
txtDataArray := txtToParse.Split(['.', ',', '!'], TStringSplitOptions.ExcludeEmpty);
txtToParse
is comma delimited text variable.
How would I correctly write that to work in Delphi 10.4 Sydney?
I tried this and I get an error that states:
Incompatible Types - a Dynamic Array and System TArray<System String> at line 340:
Under var
I have:
// For splitting
charArray : Array[0..2] of Char;
txtToParse : String;
txtArray : array of String;
Then in the main function I have:
// Split line and put it into a new array, txtArray
charArray[0] := '.';
charArray[1] := ',';
charArray[2] := '!';
txtArray := txtToParse.Split(charArray);
How can I get this to work in Delphi 10.4 Sydney?