uses
SysUtils
//文本替换
var
SourseList: TStringList;
Sourse: TStrings;
nA, nB, nC: Integer;
begin
Result := 0;
SourseList := TStringList.Create();
Sourse := TStringList.Create();
SourseList.LoadFromFile('XXX.txt');
for i := 2 to SourseList.Count - 1 do begin
Sourse.CommaText := StringReplace(SourseList.Strings[i], #9, ',', [rfReplaceAll]);
nA := StrToInt(Sourse.Strings[0]);
nB := StrToInt(Sourse.Strings[1]);
nC := StrToInt(Sourse.Strings[2]);
end;
//查找,复制,删除
TmpStr := Copy(TmpStr) 1, Pos(#9, TmpStr) - 1);
Delete(TmpStr, 1, Pos(#9,string(TmpStr)));