Consider this sample program by comparing StrUtils.SplitString and SysUtils.TStringHelper.Split :
Program Test;
{$APPTYPE CONSOLE}
Uses
System.SysUtils,System.Types,StrUtils;
var
s: String;
a: TArray<String>;
b: TStringDynArray;
begin
s := ':';
a := s.Split([':']);
WriteLn(Length(a));
b := SplitString(s,':');
WriteLn(Length(b));
ReadLn;
end.
Conclusion:
1
2
Can someone explain the difference?
I expect the result to be 2 blank lines.
LU RD source
share