cyfile / Matlab-base-toolbox

本人使用Matlab基础工具箱所编写的各种代码
1 stars 0 forks source link

将读入的url文件转换成正确格式 #3

Open 213cy opened 8 years ago

213cy commented 8 years ago
function lookstr(filename,str)
%将读入的url文件转换成正确格式后存入文本,并打开
s = regexprep(str,{'%','\\'}, {'%%','\\\\'});

fileID=[filename,'.txt'];
fid = fopen(fileID, 'w');
fprintf(fid, s);
%fwrite(fid, '文字')
fclose(fid);
edit(fileID)