怎样对文本文件中的字符串进行替换,文本文件比较大,不能用Tmemo读写
解决方案 »
- 多服务器聊天的原理到底是什么?
- Incompatible types: 'String' and 'Integer'
- 无法获取dll的传出参数,有经验的帮忙!
- 如何搜索2005年的文章?
- 文件里的字符串替换
- 如何获取在TWebBrowser中打开的网页中TEXT的事件
- 一个很有用的问题
- 在adocommand里创建存储过程为什么不行?路过帮我看一看。
- 把string类型转为char如何转假设string类型的长度为1
- 将一个表中的所有记录插入另一表中如何做?
- sql语句中如果字段内容为null,则用0代替,sql语句该怎么写?
- delphi 5 ,delphi 6,delphi 7,他们的共同点和不同点在那?
var
TestFile: System.text;
path,Str:string;
j:integer;
begin
StrList:= TstringList.Create;
GetDir(0,path);
if not FileExists(path+'\yy.txt') then
begin
showmessage('NO FILE');
ABORT;
end;
AssignFile(TestFile,path+'\yy.txt');
//SetTextBuf(TestFile,80000);
Reset(TestFile);
while Not Eof(TestFile) do
begin
ReadLn(TestFile,Str);
StrList.Add(str);
memo1.Lines.Add(str);
end; memo1.Clear ;
for j:=0 to StrList.Count-1 do
begin
AnsiReplaceStr(StrList[j],'A','9');
Memo1.Lines.Add(StrList[j]) ;
WriteLn(TestFile,StrList[j]);
showmessage(StrList[j]);
end; CloseFile(TestFile);
end;