在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
There is no function like String.Split(C# does have) in Delphi. So if you need to split a string, you can use TStringList to finish this work. With the code bellow, we can does split a string with a char. 1: function Split(aStrInput: string; aChrDelimiter: char): array of string; 2: var
3: lstSplit: TStringList;
4: arrResult: array of string; 5: begin
6: lstSplit := TStringList.Create;
7: SetLength(arrResult, 3);
8: lstSplit.Delimiter := ':'; 9: lstSplit.DelimitedText := aStrInput;
10: arrResult[0] := lstSplit.Strings[0];
11: arrResult[1] := lstSplit.Strings[1];
12: arrResult[2] := lstSplit.Strings[2];
15: end;
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论