有文本文件内容为
aaaa
bbbb
cccc
dddd现在想将第二行修改为
eeee使用tstringlist如何实现?
aaaa
bbbb
cccc
dddd现在想将第二行修改为
eeee使用tstringlist如何实现?
解决方案 »
- delphi程序,InternalDataSet:Cursor not returned from Query.游标无法从数据集返回。
- 如何让IDHTTP超时后重新连接啊???
- 实在没办法才来问的,线程问题提示 system error code:5
- 请问个变量赋值问题?
- 如何设置memo行的字符个数
- 如何限制窗口移动?
- 我做的delphi7+access程序,为什么有的在老外(美国,东南亚地区)那里用不了,总报错误?
- 一个关于文本的简单问题,请教高手
- 请教高手 透明 panel 的实现
- delphi如何与.dbf文件连接
- dbgrid控件的一个使用问题?
- delphi7中能否将程序编译成安装文件?
StringList:TStringList;
begin
StringList:=TStringList.Create;
StringList.LoadFromFile('F:\5.txt');
StringList.Strings[1]:='eeee';//第二行
StrList:TStrings;
begin
StrList:=TStringList.Create;
try
StrList.LoadFromFile('F:\5.txt');
StrList.Strings[1]:='eeee';//第二行
StrList.SaveToFile('F:\5.txt');
finally
StrList.Free;
end; //end of try
end;