本文整理自网络,侵删。
uses IOUtils, Types;
procedure StringAryDelete(var A: TStringDynArray;const index: Integer);var Count: Integer;begin Count:= Length(A); if (Count = 0) or (Index < 0) or (Index >= Count) then Exit; Move(A[Index+1], A[Index], (Count-Index)* SizeOf(A[0])); SetLength(A, Count - 1);end; procedure StringAryAdd(var A: TStringDynArray; const S: string);var C: Integer;begin C:= Length(A); SetLength(A,C+1); A[C]:= S;end;
上面的两个函数一个是用来增加 一个是用来 删除的 。
如果需要分割字符串的话 引用Strutils 使用 SplitString 即可 记得放掉哦
http://www.icy6.com/delphi/split.html
相关阅读 >>
Delphi idhttpserver接收http get请求解码问题
winapi 字符及字符串函数(1): charlower - 字符或字符串转小写
更多相关阅读请进入《Delphi》频道 >>